Gmaps.js the easiest way to use Google Maps
hpneo.github.com
hpneo.github.com
https://developers.google.com/maps/terms 10.2(a):
"(a) No "Wrapping." You must not create or offer a "wrapper" for the Service, unless you obtain Google's written consent to do so. For example, you are not permitted to: ... (ii) create a Maps API Implementation that reimplements or duplicates Google Maps/Google Earth. For clarity, you are not "re-implementing or duplicating" Google Maps/Google Earth if your Maps API Implementation provides substantial additional features or content beyond Google Maps/Google Earth, and those additional features or content constitute the primary defining characteristic of your Maps API Implementation."
With the google maps api I just create a new object and can use the various setters and getters to set and retrieve values. Everything is mostly self-descriptive as well.
You can place an extern file so that you can get additional help via intellisense in an IDE as well.
It does look lighter to use, but that's just the age-old difficulty of writing an API that's both lightweight when it needs to be and completely flexible when it needs to be. You'll run into the same problem with this library, but in the other direction, if you need more than one click handler on something, or you need to use the underlying MVC structure directly, etc.
edit: it's a minor thing, but not having to create a LatLng object every time you need one is nice on the code verbosity scale. That's one of the first things I alias when making a project with the maps api, actually. Lots of "new"s in your code isn't unidiomatic Javascript, though, even if some wish it were :)
If you need something specific and you're building something beyond the typical google maps customer, then you'll have to use the google standard apis, but most people would be happy to use something simpler.
Code-wise, I've found OL pretty awkward. It stinks of Java to me: over-organization, unnecessary complication in the name of feature completeness, confusing function sigs, overuse of `new`, etc. Feature-wise, I have little to complain about, but GMaps.js's look a lot more idiomatic and nicer to write code against, though I bet there's still comparatively a lot missing...
Would it be possible to add integration for Stamen maps?
I'd love that!
We aren't totally sure it will move forward as an independent Javascript library but it's certainly a turn it could have. We are rewriting it with Coffeescript now, so maybe is something to consider more closely.
[1] http://leaflet.cloudmade.com/ [2] http://mapstraction.com/
I had to rewrite large portions of the map interface code when I switched from Google to Open Street Map.
That said, the project is still young and maybe once I get some time, I should really contribute code to it to get those bits I needed working.
Issues and ideas are always welcome for both the JS and Gem versions!
Actually, this feels and looks like a ripoff of J.B. Demonte's work (https://github.com/jbdemonte/gmap3), or is it a fork?
Disclaimer: I commited the "staticMapURL" method to gmaps.js