Is there any way to id multiple polygons in Google maps v3?
Also, can you track when a polygon changes size? I wasn't clear about how to do that from the Google Maps API guide.
I want to set up a div or textbox that has the size of a polygon on creation, but changes value when the user changes the size.
I just defined my own id property, and used that - pretty simple, actually
Related
I have a set of random locations. The location set will keep changing. I would like to draw a polygon surrounding these locations.
Can this be done in Google Maps and how? The map will be displayed on a website only, no mobile api required.
It's called a convex hull. Here:
http://www.geocodezip.com/v3_map-markers_convexhull.asp
I would cite the code but it belongs to #geocodezip who is the authority on google maps and runs an excellent site of examples. I suggest you check it out.
I am using Google maps api v3.
It is currently possible to display a scale control, but there is no way to access the scale value from code.
I'd like a getScale(map) method to get the scale value,it should return meters/pixel values for the current zoom level.
Does any one know how to finish this method?
Thanks in advance....
Is there a way to retrieve the radius of a given location using the google API?
I want to use the above information so that when a user performs a search relevant to a location I can set the distance radius based on the size of the location instead of having a fixed radius on all searches.
Google Maps can show the perimeter of a geographic area. Nevertheless, it seems that Google has not enabled this functionality through the API.
Google Maps API V3: How to get region border coordinates (polyline) data?
Add "Search Area" outline onto google maps result
Google has started highlighting search areas in Pink color. Is this feature available in Google Maps API 3?
The Google Places API response in the Google Maps Javascript API v3 contains a viewport which is:
viewport | LatLngBounds | The preferred viewport when displaying this Place on a map. This property will be null if the preferred viewport for the Place is not known.
That can be used to calculate a radius if that is what you need or directly as the area to search.
I have a Google map I have created to highlight the location of several support groups by adding my own pins using my maps and embedding this into my website.
Is there a Google widget of any description to allows people to search my custom map and find their nearest support group (or nearest pin).
I have read through the Google maps stuff but cant seem to find anything that meets my requirements.
Any help appreciated.
The map has no clue about which markers or overlays you have put on it. Therefore there are no way you can do what you want using Google Maps directly. You can however do something else.
When you create your markers/overlays and place them on the map you can add them to an array. When you users then enters a location you can search through that array to find the markers that are closest to the location the user has entered. Google Maps API has a method for getting the distance between two latlngs, but you can also use an ordinary Haversine formula for calculating it.
Once you have found the closest markers it is not hard making sure they are the only ones that are shown on the map.
I'm implementing a Google Map on a web-page. For the purpose of this project, I want to limit how far users can drag the map, so that they can only view a certain area that falls within two co-ordinates (one specifies north-west, the other, south-east, if you get my meaning).
What's the best way to implement this using the Google Maps API?
Is there a method I can call that will do this automatically?
This method does what you want: http://econym.org.uk/gmap/range.htm