Which one to use - Kml or Google Map Api - javascript

I want to show locations on google map based on the user search criteria i.e; if a user selects London, then all records from London should be displayed and if user enters his postcode then it should show the result within 25 miles of his postcode on the google map(All data will be coming from database php/mysql).
Now the question is What should I use? KML or google map api V3, As i want to give option to user to see brief info about the location, when he will mousehover that marker, and onClick of that marker I want to show the image of location and review count, and distance(calculated dynamically based on his postcode.), I also want to ceate custom markers. I have done some work on api V3 previously but wanted to know about KML. Does it supports my need? As according to my understanding KML is just a static file and can't give such dynamics.If so, can you please provide any sample and how to do that.
Thanks

Your understanding is correct, KML are just static files. You should be able to complete your requirements using combination of google maps api v3 methods like geocode, computeDistance etc.

Related

Maps API Places Details

I'm trying to create a map which has already highlighted a place on the Map with in the top left corner the business name, address, reviews etc. If you go here:
https://developers.google.com/maps/documentation/embed/start
And under 'Highlight a place or an address' type the name of a local business, you will see what I mean.
However.. In the API docs I can't find a way to create this type of map! With the places API you can request the places' details, but I can't seem to find how to use those details to create a map like this in the javascript API. What am I missing?
The "highlighted a place on the Map" is a Google Maps feature which is not available in the API. However, you can refer to this workaround for your need
Google Maps how to Show city or an Area outline

How to get the Google Map based on users input given by textbox?

i want to display google map on my asp.net web application. when the user enter longitude and latitude value on text boxes, after clicking on show google map button, I have to display appropriate location in Google map as like this link is working https://www.google.com/maps/#37.0625,-95.677068,4z
I think you should can either use the Javascript v3 API, which gives you more control of your maps.
All you need to do is to replace the center to your center.
Or you can use the Google Maps Embed API, where you can easily replace the &q= query to fit your needs.

map data to make a Web application for displaying location of my customers

I want to create a Web application in which I need a map data of certain area and would like to show the details or location of my customers.
I have seen the Google maps api, but I was searching if I could get something privately for my web application.
Please reply. Thanks.in advance
You can add marker to your map. Markers are designed to be interactive with 'click' events. You can add an event listener to bring up an info window displaying custom information. These marker will only show what you specify. They will not show other marker ( shops,petrol bunks,aims etc)
You can always use the Places API from Google in order to show various places on the Google Maps and also the detailed description about that Places.
Here is the detailed description for the Places API.
Here is a tutorial that may help you in your implementation.

Google Maps Api, How can I make the seach box to display results only for custom locations(for example locations that I want)

I am using google maps api. So far I understand how to make the basic map, how to add more than one marker on a custom location, and how to add the search box(https://developers.google.com/maps/documentation/javascript/examples/places-searchbox). Whan I need now is that the seach results that are displayed are for custom locations only. In short, for example if I have 3 markers and they point at Berlin, London and Paris, and then I use the search box I must not be able to find any other locations except those 3. I was thinking about using an array with the coordinates of the locations that I want, but I cant make the seach box use this array as a data base to search and not the google database. Here is a site that uses this custom setting that I want: http://www.kebaben.no/, you can only find the locations that are marked on the map. In this site this is done by some database, but I like to do it with JavaScript and some array I just can't understand how to make the search box use this custom Array and search only for the locations that are in it. Thank you very much in advise.

storing google maps marker information in a database

I am creating a website with Google App Engine using Python for the back end and I am trying to give the website some google maps functionality.
I would like to have it so that users can submit a marker onto the map and then that marker's GPS coords will be stored in a database along with some other text info and I am able to do all of this but I am not sure how to put all of these markers with their respective infowindows back out onto a map. I would imagine I could do some sort of for loop but I can't find what the javascript should be to place them all. And it is going to be over 1000 markers and more being added every couple days so just putting them on a map one by one isn't really an option.
See the articles section of the documentation, there are a number of articles about using PHP/mySQL, the concepts of which should be applicable to your system.
This one probably covers what you need:
Using PHP/MySQL with Google Maps
Shows how to use PHP/MySQL and the Google Maps API v3 to create a map that polls data from a database and shows as markers.

Categories