Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/phawk/google-maps-js-library

A simple google maps library to help make 1 off or simple maps easier and faster.
https://github.com/phawk/google-maps-js-library

Last synced: about 1 month ago
JSON representation

A simple google maps library to help make 1 off or simple maps easier and faster.

Awesome Lists containing this project

README

        

Google Maps Library
===================
Basic Usage
-----------
1. Add the *phgmaps.js* file to the head of your document.
2. Instantiate a new map object:
var map = new phawkGmap();
3. Either: Geocode a map by address
map.geocodeAddress('1 Infinite Loop, California');
Or: Create a LatLng Object and use the createMap method:

var mapPos = new google.maps.LatLng(54.7354923, -5.785993299999973);
map.createMap(mapPos);
4. You can add a marker at the current map position by using the *mapLoaded* event listener.

$(document).bind('mapLoaded', function(){
// set markerPosition to a google.maps.LatLng object.
var markerPosistion = map.latlng;
map.addMarker(markerPosistion);
});