[Google Maps API v2] Re: Markers working but not Polygon
On Aug 20, 10:25 am, Abhilash Cherukat <abhi.cheru...@gmail.com>
wrote:
> Hi, I am trying to get a polygon on my map. Markers are working fine
> but not polygon
> Where i went wrong?
Using Version 3 syntax to define a polygon while loading the Version 2
API. They are not interchangeable. Here's the Version 2 documentation:
http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GPolygon
var shape=new GPolygon(paths,'#ff0000',2,0.8,'#ff0000',0.35);
map.addOverlay(shape);
You'll probably also need to change this
var map = new google.maps.Map(...
into
var map = new google.maps.Map2(...
to be equivalent to
var map = new GMap2(...
--
You received this message because you are subscribed to the Google Groups "Google Maps API V2" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home