How to show more than one places on google maps? - google-maps

Using the public google maps site, how can I show multiple locations on a map. I want to do this using the query string. For example, I might want to show Portland, OR and Seattle, WA.
http://maps.google.com/?q=Portland,%20OR%20AND%20Seattle,%20WA

I don't think it's possible on the Google Maps site, so you probably have to use the API and build a web page with two maps on it, each showing the location depending on the query. You might also want to look at the Geocoding API if you are going with that.

Related

Google Map advice

I've never used Google Maps for web sites.
I would like to know if it's possible to use it without having coordinates in my database? I only have the name of a city.
I want to get city names from json response, and show all events locations on google map.
Thanks!
yes. and there are lots of examples here at SO and on Google.

Ads in Google Maps API v3, what do they look like and are they really required

My client is sensitive to having ads on their for profit site but don't have 10k a year to pay for google maps.
The new Gmaps TOS says ads may be added to the map, and but mentions a opt out process, and it does not appear that any of the Google Maps V3 maps I see have ads.
So is it easy to get out of displaying ads on a google map?
Know any examples of what these ads look like?
There is an example of what the ads look like here:
http://techcrunch.com/2008/10/09/google-turns-on-text-ads-in-google-maps/
Personally, I have never seen them in a maps application either. If they are only in v3, and you want to avoid them completely, then stick with v2, it will still be viable for quite a while.
If your client wants no adverts you could try open street map. Although this is open source it places restrictions on using data from Google etc

How to use maps in an app with unlimied domains?

I have an app that's used on many websites and different domains.
Not a low amount like 5-10, more like 200+
And I want to display something like a google map.
Their API key has to be manually requested each time. -We have to avoid this.
Is "Using a Bing Maps Key to access the Bing Maps SOAP Services" a solution?
Or is better to create a single web page on a separate website that displays any map.
It would get the map pin point from a query string. Then display this map using an iFrame.
Looks like eventbrite does that:
http://www.eventbrite.com/googlemap?eid=1885257857&iframe=Y
Bing Maps requires a key per domain, so thats not an easy thing to achieve. You have two options as I see it:
1) Create one map on one domain and share it with all the other sites using and iframe
2) use google maps v3 as that no longer requires api keys and is therefore not locked to a domain

Google maps API - how to include marker (and info) for specific business address?

All the methods and examples I can find about the Google maps api is based on a postcode, or coordinates to get the desired location - what if I want to place a marker for a specific business which has been added to google maps, so it shows tel number etc like an embeded map would? Even if I use exact coordinates for the address it doesn't recognise it. Sure I'm missing something really simple here...
Thanks!
The Google Places API, this does what your looking for. I couldn't tell you how to implement as of now because i am trying to put it inside of my Rails application but i will update my answer in the future when i do get it working though.

How to handle inaccurate Google Maps locations?

When I type in addresses in Google maps for locations in Asia, quite a lot of them are off by more than 200 metres. For example, "blk 85 bedok north road, singapore" is off by more than 300 metres. While I don't expect Google Maps to be spot on every time, sometimes the error is too great for certain use cases. What options do I have to handle inaccurate Google Maps locations in a web app? The web app should let the user enter an address or postal code as part of an entry and I will geocode the address and store the lat-long.
You could use bing, yahoo's and google's Geo Location api's to find latitude and longitude for a location, average the results together and use the result. Thus, if they all agree, you still get a good location, but if they disagree you get the best approximation of all three.
You could even programmatically compare the results from each engine and throw out any that don't agree with the others (for instance, if bing and yahoo agree and google does not, you could throw out google).
Beyond that, if you have a collection of addresses you know to be wrong, you could simply store the correct longitude and latitude for those points, and override the results in those cases.
Of course, to get around this problem at all, you'll need to geocode the addresses, check their validity in some way (as described above), and plot them using their latitude and longitude.
You don't have any fixes for this really, you're at the mercy of the accuracy of google maps here. The important part is you don't know if the address in inaccurate when doing one search to the next, so nothing you can do to handle it.
You can post a topic here and google will see it and often respond as well: Google Maps Local Listing Forums. I'd open something there with some of your examples and hope they get more accurate...that's all you can do in this case.
There are always other alternatives as well, yahoo and bing have mapping APIs, but I have no idea how much better or worse off you'd be going that route.
The problem is not the lat/lng data, in fact, they are correct. The problem is that the geo coords of the map tiles of the public Google maps api are inaccurate. The maps at maps.google.com are provided by a different map provider than the map tiles used with the public Google Maps API that you can embed in your website, use in your own applications, etc.
Check my recent posting at Google Maps & apps with mapview have different current positions
Is the result out on maps.google.com as well as through the maps api?
If on google maps live site the result is accurate then you can do an ajax search to return the correct lon/lat.
I have used this when geocoding UK postcodes
Geocoding UK Postcodes with Google Map API
I tried to reply to the upper answer, but I am not qualified enough yet. Just be aware that whatever you're using for geocoding, sometimes has restrictions on the use of that data. For example, google's geocoding API isn't allowed to be used to display information retrieved anywhere but google maps. The same might be for the others, I don't know what your project is, but it's something to be aware of.