Andrew Thorp changelog.com/posts

GMaps.js - the easiest way to use Google Maps

Google Maps is extremely powerful, but using the JavaScript API can be a bit complex at times. That is exactly the problem that @HPNeo is trying to solve with GMaps.

There are a few requirements: jQuery and the Google Maps API. Just make sure you add all three JavaScript libraries to your page and you will be good to go:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript" src="https://raw.github.com/HPNeo/gmaps/master/gmaps.js"></script>

Adding a basic map is very easy:

new GMap({
  div: "#map",
  lat: 39.905588,
  lng: -75.16644,
  zoom: 20 // (Optional: defaults to 15)
});

They also have support for markers, geolocation, geocoding, and more.

The project could use some documentation help, so I would encourage you to fork the repository and get involved!

Checkout the examples or browse the source at GitHub


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00