Google Maps

gmaps.js allows you to use the potential of Google Maps in a simple way. Read Full Documentation.

Table of Content

Examples

Basic Map
							
							<div id="map-basic" style="height: 300px !important"></div>
						
					
						
							var mapBasic = new GMaps({
	div: '#map-basic',
	lat: -12.043333,
	lng: -77.028333
});
					
				
Markers
					
						<div id="map-markers" style="height: 300px !important"></div>
					
				
					
						var mapMarkers = new GMaps({
	div: '#map-markers',
	lat: -12.043333,
	lng: -77.03,
});

mapMarkers.addMarker({
	lat: -12.043333,
	lng: -77.03,
	title: 'Lima',
	details: {
		database_id: 42,
		author: 'HPNeo'
	},
	click: function(e){
		if(console.log)
			console.log(e);
		alert('You clicked in this marker');
	}
});
	
Polygons
	
		<div id="map-polygons" style="height: 300px !important"></div>
	
	var mapPolygons = new GMaps({
	div: '#map-polygons',
	lat: -12.043333,
	lng: -77.028333
});

var path = [[-12.040397656836609,-77.03373871559225],
[-12.040248585302038,-77.03993927003302],
[-12.050047116528843,-77.02448169303511],
[-12.044804866577001,-77.02154422636042]];

polygon = mapPolygons.drawPolygon({
	paths: path,
	strokeColor: '#BBD8E9',
	strokeOpacity: 1,
	strokeWeight: 3,
	fillColor: '#BBD8E9',
	fillOpacity: 0.6
});