(function($) { "use strict"; /* -------------------------------------------- google map -------------------------------------------- */ window.onload = maploadscript; function gmapinit() { var gmap = $('.map-canvas'); gmap.each(function() { var $this = $(this), lat = '', lng = '', zoom = 12, scrollwheel = false, zoomcontrol = true, draggable = true, maptype = google.maps.maptypeid.roadmap, title = '', contentstring = '', theme_icon_path = $this.data('icon-path'), datalat = $this.data('lat'), datalng = $this.data('lng'), datazoom = $this.data('zoom'), datatype = $this.data('type'), datascrollwheel = $this.data('scrollwheel'), datazoomcontrol = $this.data('zoomcontrol'), datahue = $this.data('hue'), datatitle = $this.data('title'), datacontent = $this.data('content'); if( datazoom !== undefined && datazoom !== false ) { zoom = parsefloat(datazoom); } if( datalat !== undefined && datalat !== false ) { lat = parsefloat(datalat); } if( datalng !== undefined && datalng !== false ) { lng = parsefloat(datalng); } if( datascrollwheel !== undefined && datascrollwheel !== null ) { scrollwheel = datascrollwheel; } if( datazoomcontrol !== undefined && datazoomcontrol !== null ) { zoomcontrol = datazoomcontrol; } if( datatype !== undefined && datatype !== false ) { if( datatype == 'satellite' ) { maptype = google.maps.maptypeid.satellite; } else if( datatype == 'hybrid' ) { maptype = google.maps.maptypeid.hybrid; } else if( datatype == 'terrain' ) { maptype = google.maps.maptypeid.terrain; } } if( datatitle !== undefined && datatitle !== false ) { title = datatitle; } if( navigator.useragent.match(/ipad|iphone|android/i) ) { draggable = false; } var mapoptions = { zoom : zoom, scrollwheel : scrollwheel, zoomcontrol : zoomcontrol, draggable : draggable, center : new google.maps.latlng(lat, lng), maptypeid : maptype }; var map = new google.maps.map($this[0], mapoptions); //var image = 'images/icons/map-marker.png'; var image = theme_icon_path; if( datacontent !== undefined && datacontent !== false ) { contentstring = '