How to compare Google Maps coordinates on an accurate way? - google-maps

I have the coordinates(lat, lng) and the information associated to this point in an excel sheet.
I want to compare the coordinates that I have stored on a database(lat, lng) with the excel ones.
My main idea is to show the correct info about the road point on the info window associated to the marker.
My doubt is about how to choose the coordinates on the most accurate way?.
Any suggestion?

So I think I understand what you are doing - capturing the coordinates of a user's location and then you want to find information about what is nearby to that location. If I have that correct, I suggest you take a look at the Places Library.
Google provides a library/service that allows you to send a requestthat includes a location and radius or coordinates that define a rectangular bounds and the service will return information about nearby places of interest. There are many ways to refine the searches to focus on different types of features.
I think this is what you are looking for - if not, provide a little more detail and I will try to help you.

Related

Free geocode API allowing store names and coordinates

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.

Is it possible to put a location marker on a google map without requesting it from the google server?

Really quick/simple question that will determine which map API i use for my project.
I dont need an example- ill figure that out, i just need to know if the capabilities are there.
If i have store geocode (latitude, longitude) coordinates in a database, can i put one of those little red markers on a google map without having to actually make a geocoding request from google?
Additional question:
Also, would it count towards any quotas every time i display one of their maps, even if i give them the geocoded coordinates? Because i mean technically their map still has to find those coordinates...
Q1: Yes — you tell the API the coordinates of where to put the marker, rather than get Google to find those coordinates.
Q2: The usage limits are published by Google. You can have up to 25000 map loads per day. If you don't use the geocoder because you provide the coordinates yourself, then you don't use a geocoder access.

Closest of a list of addresses from a location

does anyone know how i can return a googlemap with pins for every location within a set radius. Don't necessarily need a specific distance from potential plotted route. I want the user to be able to specify their address (postcode) and a set distance (10,20,50 miles) and then i can show these results on a map. I have the list of postcodes, held in my database, do i need to generate something like a kml?
Cheers
Tim
This sounds like a classic Store Locator application, which is a bit complex to detail in an SE answer.
Google have an example documented, though.

Get type of terrain by coordinate

I'm looking for a solution to be able determine landscape type by a given coordinate, for example check if current position is water/forest/town/road and so on. I found google.maps.MapTypeStyleElementType object specification in the Google Maps specification, but not sure if it could help me or not.
Probably, there are some another Maps API with such functioality? Or maybe I should refer to the different types of offline maps?
Nope, the link you send is just for styling the proper features, not to tell which feature is at a given coordinate. If you are interested in landscape, then Corine Land Cover is the thing you are looking for. It describes the types of biotops like forest, water, but also land use - meadow, field, buildings etc. However, I don't know if there is such an online service where you could query particular coordinates. Other solution for you would be to import these GIS layers (they are freely available) to your own gis map server. Maybe this is partially solved as there are e.g. projects how to incorporate these into openstreetmap.
Well not quite, but you could get close to what you're looking for by using the Google Reverse Geocoder and the Google Places API
Google Reverse Geocoding
http://code.google.com/apis/maps/documentation/geocoding/#ReverseGeocoding
If you send the service a geocode it will send back an address type and/or one of several adress components http://code.google.com/apis/maps/documentation/geocoding/#Types
Google Places API
http://code.google.com/apis/maps/documentation/places/
You could use the Google places API to search for for what's near. If the geocode is in the middle of the lake, the Places API may return something like "Lake Michigan" and then you'd know the terrain obviously.

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.