Reputation: 63619
I am using Google Maps for my website and I want to create boundaries of towns and cities, as shown in the screenshot below.
Problem: There seems not to be any feature in the V3 API to perform this function. I believe it involves retrieving the Latlng of the path that forms a polygon around the area. How then do you get the Latlng of the points needed?
Screenshot
Upvotes: 2
Views: 2383
Reputation: 31912
ok, assuming you already have a path defined as a Polyline, you can then call the .getPath() function which returns an MVCArray of LatLng objects. I assume that answers your question "How then do you get the Latlng of the points needed?"
Upvotes: 1