Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/phawk/google-maps-js-library
- Owner: phawk
- Created: 2011-07-23T15:24:05.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-07-23T15:26:17.000Z (over 13 years ago)
- Last Synced: 2024-10-25T01:39:39.291Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 85 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.markdown
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);
});