https://github.com/alchaplinsky/maps.js
Easy and declarative way to use Google Maps API
https://github.com/alchaplinsky/maps.js
Last synced: 20 days ago
JSON representation
Easy and declarative way to use Google Maps API
- Host: GitHub
- URL: https://github.com/alchaplinsky/maps.js
- Owner: alchaplinsky
- Created: 2014-08-27T07:39:44.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-09-01T07:03:04.000Z (almost 12 years ago)
- Last Synced: 2025-12-13T08:18:00.969Z (6 months ago)
- Language: CoffeeScript
- Homepage: http://alchapone.github.io/maps.js
- Size: 354 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Maps.js - Google Maps JavaScript API V3
Maps.js A Javascript library for working with Google Maps JavaScript API V3.
Gives you declarative way of creating maps and simplifies manipulating with maps after they're created.
## Build
To build maps.js from the source, you'll need node.js and npm.
git clone https://github.com/alchapone/maps.js.git
cd maps.js
npm install
grunt
## Usage
To Build Google Map wit Maps.js you need to follow 3 simple steps:
1. Add Google Maps API script to your HTML:
``
2. Create a container for map with fixed height in your HTML:
`
`
3. Create a new instance of `Map` function with parameters:
- To create a world map - minimum parameters required:
map1 = new Map({
div: '#worldmap'
});
- You can set center and zoom level for map
map2 = new Map({
div: '#sidneymap',
lat: -33.867365,
lng: 151.203957,
zoom: 8
});
- Easily add markers with info windows during map creation
map3 = new Map({
div: '#sidneymap',
lat: -33.867365,
lng: 151.203957,
zoom: 8,
markers: [{
lat: -33.867365,
lng: 151.2039,
title: 'Sidney',
animation: 'drop',
info:
content: 'Welcome to Sidney!'
}]
});
- Use goecode features without specifying lattitude and longitude
map4 = new Map({
div: '#map2',
geo: 'Munich'
});