Google Blogoscoped

Forum

Google Static Maps API  (View post)

Pamela Fox [PersonRank 2]

Friday, February 22, 2008
12 years ago18,336 views

We've clarified in the forum that the query limit is per viewer IP.

Here's an example of loading in multiple markers from a static map with multiple markers (deferred loading of the Maps API until click)
gmaps-samples.googlecode.com/s ...

Enjoy!

callum [PersonRank 2]

12 years ago #

Is there a limit of the number of markers? I can see the potential for some abuse there :) Length of a URL your browser accepts perhaps.?

Haochi [PersonRank 10]

12 years ago #

That's like super late mate, I created something similar (though non-official and possibly against the TOS) like over a year ago.
googlified.com.googlepages.com ...

Pamela Fox [PersonRank 2]

12 years ago #

Hi Haochi- Yes, other people noticed that service as well and used it, but doing so is against the TOS. Perhaps you'd like to switch your wizard over to using the new API? It's got a much cleaner URL scheme so I think you'll find it easier to use.

Pamela Fox [PersonRank 2]

12 years ago #

Callum – The max number of markers is 50. We would prefer if you did *not* abuse the API, as that could lead to _dire_ consequences. :)

FYI – Make feature requests here:
code.google.com/p/gmaps-api-is ...

callum [PersonRank 2]

12 years ago #

Pamela: You mean one can't use it to render additional image layers over a map using one marker per pixel :)

In all seriousness, it might be nice to be able to render a route on a static map via parameters passed in via the URL – I'll check out the groups link you sent and submit a request.

Actually, what would be *really* useful would be able to render a Street View at a lat/long/zoom plus yaw/pitch to a static image via a URL in the same fashion.

Nicolai [PersonRank 1]

12 years ago #

GIF is still more widely supported than PNG, especially on older or smaller devices. If I had to pick one format for a simple image, I would pick GIF.

Roger Browne [PersonRank 10]

12 years ago #

What's the point of requiring an API key when it's in the HTML? What's to stop the API key being copied by everyone else?

Nikolai [PersonRank 1]

12 years ago #

I think, the api-key in googlemaps api is binded on the url where you include the googlemaps. So you can copy it, but you can't use it.

Pamela Fox [PersonRank 2]

12 years ago #

Nikolai is correct -

The API key works the same for the Static Maps API as it is does for the Javascript Maps API. It's checked against the window.location.host of the page that embeds the map/image.

Roger Browne [PersonRank 10]

12 years ago #

I still don't get it. It's a static URL, so you don't need to embed it in another page. And it works without JavaScript, so there's no "window.location.host" to check.

It seems to me that once I publish a map with my API key, then anyone else can use that same API key for their maps.

Pamela Fox [PersonRank 2]

12 years ago #

Sorry for the confusion. In the case of the static maps API, the key check would be performed against the referer URL (if one exists).

Roger Browne [PersonRank 10]

12 years ago #

OK, thanks for the confirmation. I'd figured out by experimentation that it used the referer. Although that doesn't always exist, it's sent often enough that this would prevent anyone usefully abusing my key.

Brent Housen [PersonRank 0]

12 years ago #

For anyone interested, I wrote a wrapper class in PHP so you can use this API easily.

You can find it here: code.google.com/p/phpgmapsstat ...

This thread is locked as it's old... but you can create a new thread in the forum. 

Forum home

Advertisement

 
Blog  |  Forum     more >> Archive | Feed | Google's blogs | About
Advertisement

 

This site unofficially covers Google™ and more with some rights reserved. Join our forum!