Let's say if I search a district of a city on the google map, I got the results on the map as a polygon. My question is how can I get the bounds of that polygon?
I observed that regions, districts are delimited with dashed lines is there a possibility to get the bounds of a searched district or region?
Related
Is there a Geo API that I can query with an area name and receive back a polygon that represents the given area boundary?
Some form of a gazetteer that gives back a polygon instead of the latitude/longitude coordinates.
For example, if I search for "Santa Barbara" I would like to get back the array of the coordinates of the polygon seen on the picture below.
At the moment there is no such function in the public Google APIs. If you search for Santa Barbara using geocoding you will get the location with the viewport and bounding box. However you won't get a polygon around the area. When searching for Santa Barbara using Google Maps it uses a private API to show the polygon around the searched region.
One workaround would be to create your own polygons and save them to your database and then check if the lat/long is within those polygons.
Is there a function in google map that can get the geofence or the polygon area of city? For example i like to get the geofence Manila Philippines. I want to save the polygon Latitude and longitude of the city to MySql geometry column.
At the moment there is no such function. If you search for Manila, Philippines using geocoding you will get the location with the viewport and bounding box. However you won't get a polygon around the area.
One workaround would be to create your own polygons and save them to your database and then check if the lat/long is within those polygons.
I need to draw polyline for the more than one vehicle that are being tracked in our Appln in PHP and google map. Could any one plz tell me how to draw poly line for multiple vehicle with latitude and longitude got from Mysql Database.
You'll have to fish out your lat and lon values per vehicle out of the database, and then use the API to create markers, as explained here
I would like to move between two addresses in Google maps however i do not have the Geo coordinate latlng (latlng range) for this movement. I can select two addresses from a list which i can make the marker move between. Basically i want to show movement between two locations.
Is it possible that i can ask Google maps for a list of all location names on its map?
Like in this example but i would like to provide a drop down list of all existing addresses in that country
The answer to your question as formulated is no. You can't use Google Maps for a list of all location names on its map, that is against the terms of use. You can get lists like that from Open Street Maps and/or geonames.org (an in the US from the census tiger data), it just might not be consistent with the map displayed by Google.
Is there a way to retrieve the polygon coordinates of buildings on Google Maps?
I could draw an overlay and grab polygon coordinates manually, then try to determine whether a latitude and longitude are in those coord boundaries. But is there a smarter way of doing this?
The goal is to programmatically understand where a set of lat/lng belong to a building.