I'm trying to develop a mobile app that locates the nearest location. I'm using Phonegap, Google Maps API v3, and KML layers to show the locations. I came up with this workflow:
1. The main view contains an autocomplete search box , so that once the user starts a search:
The query is sent to a service that will filter and generate a KML file for the results.
So here I am not using Google Maps Distance API; the service will retrieve the user's lat and long and then generate KML files which will contain the user's location and sorted matching results.
Finally we use the KML file with Google Maps for rendering the results.
Is this the right way to go about doing things?
Or is the Google Maps Distance API more accurate than manually calculate the distance using some maths?
Thank u in advance.
Related
I have an ios application which uses default Apple map for displaying selected records on map. Now I have to add a button "Drive Route" which launches google maps installed on device and show direction from current location to selected records .I already did this by using Google Maps URL Scheme for ios.
Now i want to know the distance and Travel time between selected records and current location. I found that we can do this by using Distance Matrix API like this :
"https://maps.googleapis.com/maps/api/distancematrix/json?units=metric&origins=(a_coordinate_string)&destinations=(b_coordinate_string)&key=<#GOOGLE_API_KEY#>"
But I want to use Google Maps SDK methods to get desired result.
NOTE : I have used Places SDK for ios , where we have Methods AutocompleteQuery () etc.
Does Google Map SDK provide any Methods to get desired Distance and Travel time?
Please, help me.
Thanks in advance.
Google Maps SDKs currently do not have this kind of feature. You will need get the results programmatically via Distance Matrix Web Service request.
If you would like to have this feature available in the Google Maps SDKs, you may file this as a feature request in Public Issue Tracker:
https://developers.google.com/maps/support/#issue_tracker
i am using google map kml field (direct iframe code from gmap)
for showing different locations/shops on map:
Google map #my site,
i need to add a search box from where user can search nearest shops to his/her location...
can any body help me in this out..
It is my understanding that the API does not provide support for searching your provided KML:
google maps API geocode finds nearby KML
Google provides a service called placesService ( https://developers.google.com/maps/documentation/javascript/places ) which lets you make requests to their database of content and return results in the form of KML near a location within some bounded area - but to my knowledge you cannot specify the source to search. (You could try testing the placesService, with a KML layer set on your map and see if it includes your data).
Assuming you are generating your KML from a database, can you could regenerate it appropriately filtered or styled based on the user's search terms. This seems the most likely solution without additional details.
I have done google map search with python. But this one searches hospitals
You need to get google place api and place in code and reconfigure for search,
it will print out name, location address, and website
https://github.com/rockcastle/GoogleMap-Scrapping
I have a BlackBerry app in which I want to load the Google Maps app. I have the code for plotting a single location, and now I want to plot multiple locations on the same map.
When I search, I found that multiple locations can be plotted with a kml file having multiple location coordinates. But this kml file should be available in a public URL. So that is not possible. Is there any other way to pass multiple locations simultaneosly?
Is it possible on BlackBerry?
try blackberry maps demo (included in the blackberry simulator). it have the facility to show multiple locations.
I've started developing a small app which main goal is to draw a map using Google Maps API (v3), and to show business in the area drawn (bars, restaurants and so on).
I found the Google Places API that was supposed to be released this month but it hasn't been. As far as I know the point of that API is to offer results from the Google's database of business, so later we could put those business in the map.
However now I've found this sample which is using the AJAX Search API and Local Search Control for Google Maps to do the same thing.
So the question is, what is the point of the new Google Places API?
Thank you in advance!
The Places API returns a list of locations near a specific lat/lng, while the Local Search API allows for an arbitrary search of Google's database of business listings and other POIs.
I want to develop an application to find the value of a property based on some constants(such as the distance from the shore,the width of the road in frond of the property,the neighborhood that is located to etc) -constants that i will have to insert to that application (i guess with some tool that can make kml files with point,lines,areas and geocoding information) and variables which i will have τo take from the user through a series of forms.To succesfully calculate a value i need to make spatial querys (such as which is the distance of a point from that polygon?)
Is it possible to develop such an app with google maps or google earth or i have to develop with the use of an GIS(ESRI,Manifold etc).Also which is the difference between the possibilities of the resulting apps with maps and earth?
Thank you
Bill Chadwick has some Javascript for Google Maps that calculates the distance of a point from a poly. See the the bottom of this page.