Free geocode API allowing store names and coordinates - google-maps

My application should allow users to store events and their locations and then perform search on them - so I need those locations in my database with their names and latitudes/longitudes. Google API doesnt allow storing anything else but place IDs so I have to find something else that can autocomplete/suggest places on UI and allow storing it my database.
Does anyone know such a good service?

You can simply add your points in your DB based on each point Lat & Long values. So when user is searching somewhere you have his current location(Lat-Long), Therefore you can search in your DB and get the distance of each saved point with current location and retrieve the results you want to show (i.e in JSON format).
In client-side use some auto-complete jquery library to show the nearby places and somethings like that (with additional information).
Google Map API has a service that you can show some custom marker on the map with your custom configuration like marker icon, description and etc. You can show your additional information in description as HTML format.
You can see some example here:
Customizing a Google Map: Custom Markers
Hope these tips would be helpfull. Regards.

Suddenly I've found an answer that helps me:
https://productforums.google.com/forum/#!topic/maps/hNc1OOU6Zm8
So I can use some Google's data under some conditions.

Related

How do I store and retrieve locations for google map into mysql database

I'm sorry, I'm extremely new to google map, thus I need some help here.
I want to store and retrieve locations that I've input and display in the google map.
Any startup for me to get me going? Thanks.
Try Google Earth, it will save locations in kml, and and you can feed data to it from an external source. You can also place marks in Google maps if you are signed in. Other wise you didn't give enough information

Website; let user add location and get coordinates

I've been developing a website where users can add a place (say a store in a city) and it is stored in a database. Now I would like to be able to display these places on a interactive map on my website. I got a bing maps developer key but it seems i can only display the data if i have the coordinates (lon/lat). Is that true? And if so, how do I get the coordinates automatically once a user adds new data?
As an example: You add Store XYZ in City XYZ, but you DON'T have to enter the coordinates. Now, this info is stored, but I don't have the coordinates..
Any help is much appreciated!
If you don't have any plans on allowing your users to insert place locations in a map or by filling some lat/long data, I suggest you to use google web services to get geolocation of those places. You'll need to format the input you send into something like an address to get it working properly though.
See this Google documentation

Google Maps - Places library - Search for custom placed markers in radius

I'm developing a app that makes use of the Gmaps Places library and actually, I have two questions:
1) Does anyone know how long it takes to an added place(by POST request) to show up on the map? I only need it on the app's map, so I don't care if Google doesn't approve it. I've already sent the add request and received OK as response.
2) It is possible to search for markers, placed by me, as if they were places(and using radius)? Not necessarily using the Places library. I ask this to see if is possible to come with a backup plan if the waiting mentioned above is long(clients, clients...). Then I would have the places 'offline from Gmaps', mapped inside a JSON file.
If I understand you correctly, you want to combine Google's Places API with a custom location set? Without more detail I can't really tell you what the code would look like, but you'd basically want to mash up the results you get from places with your own data and place markers based on that merge. If you're searching by radius or polygon you can do a 'within bounds' search on your dataset and return any results that are within the search zone to feed into your marker creator.

Google Maps Store Locator Search field for embedded map

I've embedded a map on a clients site, with their various store locations, using the google saved maps technique: http://passportal.com.au/stockists So basically I don't want store the marker locations in a database, I'm just interested in using the marker positions on the saved map as seen in this demo: http://maps.google.com/help/maps/getmaps/plot-multi.html
I've seen it on plenty of sites and am wondering if there is an easy way to add a search field to find the closest marker to the users address. Something like this: http://www.victoriantextiles.com.au/store-locator
The closest I could find was a google gadget that allows you to type in directions: http://www.google.com/ig/directory?synd=open&hl=en&gl=en&url=http://igwidgets.com/lig/gw/f/islk/89/slkm/ik/s/1329844/87/charles447/google-maps-driving-directions.xml
Any help would be great, thanks!
For this purpose, I use Google Maps API Distance Matrix where I would pass in one origin - user's location and multiple destinations - our dealers. Then I sort the results by distance and take 3 closest to display in a list. Works pretty fast, however, I don't know how you'd achieve this without having some sort of database of your store addresses.

How to extract the lat/lng of pins in google maps?

I want to extract the latitude and longitude of a set of about 50-100 pins in a Google maps web page. I don't control the page and I don't need to do it more than once so I'm looking for something quick and dirty. I've got FireFox with FireBug as well as Chrome and all I need is something that's easier than re typing all the numbers.
Simply click the link shortcut on the map to retreive a URL for the map with pins in.
Next add &output=kml to the end of this url and use the link to retrieve a kml file containing all the pin data.
This kml file is actually in xml format so parsing it should be easy, you just need to look for <coordinates> elements which contain the latitude and longitude data you need.
The kml format is documented here: http://code.google.com/apis/kml/documentation/kmlreference.html
Just saving the .html file and using regex works:
These two reg-ex might be good starting points:
#[0-9]+\.[0-9]+,-[0-9]+.[0-9]+",geocode:"",sxti:"[-#A-Za-z .]+"
{id:"[A-Zloc0-9]+",fid
Google has change a lot the way you can extract information about google.maps and has set some limitations like numbers of queries by day.
To extract the lat and lon of Google maps you need a bit of knowledge about HMTL code and manipulating JSON/XML files. (all can be found in many tutorials.
I recommend you to extrac the data using de "Google Places API" it's VERY EASY! and you can extract about 150k locations by day for free. You have to get an account, activate your privileges of API Places (turn on/off buttom), get you secret KEY and then use a simple URL to extract the JSON/XML file. Here are two great links for that:
[1] https://developers.google.com/places/documentation/search?hl=en
[2] https://developers.google.com/places/training/basic-place-search?hl=en
If you want DETAIL info about the coordinates that you'll get, go to the section "Requesting Place Details" in the second link, that gives you info about what kind of site is that, the phone number and all the comments that users has made, if they are available.
Great coding and greetings!
Depending on the type of the map and whether the pins are set by latitude and longitude or by address, it might even work to just get the link (click on "Link" at the Google Maps page, the URL in the browser might not be the sam) and look for the "sll=[...]" parameters.