I want to create a local map for my city where people can cover area with polygons and get their latitude and longitude
For Example there is a world map and someone come and he wanted to cover us then he can simply cover it and get its latitude and longitude of corners or borders
Is there any way or example i searched about it on google and Site both but didn't get Anything
Sorry I've no Codes i want idea, code or something helpful.
You can add regions to your map by selecting 'Additions' then 'Highlight Regions' from your map menu. This will give you the following options: countries, states, cities, counties, circles, rectangle, polygon, zip (post) code area, or draw freehand.
Google Maps Platform offers Cloud-based maps styling features that make it easy to style, customize, and manage your maps using the Google Cloud Console, letting you create a customized map experience for your users without having to update your apps' code each time you make a style change.
A simple search yielded http://www.the-di-lab.com/polygon/ and you can find a lot more samples at http://code.google.com/apis/maps/documentation/javascript/demogallery.html.
Unfortunately the above demo is a minified js. But the essential part of drawing a polygon (area) on google maps is to 1. load the map 2. trap the click events and the position (lat/lon) 3. draw lines 4. Finally when a double click is received, close the polygon
I unfortunately do not have a ready made sample in hand.
The answers here are quite outdated. Google Maps now have a drawing library, This library allows the user to insert markers, circles, polygons and other types as well.
You can find an example on it here. And the library reference here. And the documentation here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With