D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
shubmkcj
/
urbane.createerp.com
/
assets
/
pages
/
Filename :
jquery.gmaps-full.js
back
Copy
/** * Theme: Adminox Admin Template * Author: Coderthemes * Google Maps */ !function($) { "use strict"; var GoogleMap = function() {}; //creates map with markers GoogleMap.prototype.createMarkers = function($container) { var map = new GMaps({ div: $container, lat: -12.043333, lng: -77.028333 }); //sample markers, but you can pass actual marker data as function parameter map.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'); } }); map.addMarker({ lat: -12.042, lng: -77.028333, title: 'Marker with InfoWindow', infoWindow: { content: '<p>HTML Content</p>' } }); return map; }, //init GoogleMap.prototype.init = function() { var $this = this; $(document).ready(function(){ //with sample markers $this.createMarkers('#gmaps-markers'); }); }, //init $.GoogleMap = new GoogleMap, $.GoogleMap.Constructor = GoogleMap }(window.jQuery), //initializing function($) { "use strict"; $.GoogleMap.init() }(window.jQuery);