{namespace gomapsext=Clickstorm\GoMapsExt\ViewHelpers} (function ($, window, document, undefined) { $(function () { var gme = new Object(); gme.zoomTypes = new Array(google.maps.ZoomControlStyle.DEFAULT, google.maps.ZoomControlStyle.SMALL, google.maps.ZoomControlStyle.LARGE); gme.defaultMapTypes = new Array(google.maps.MapTypeId.ROADMAP, google.maps.MapTypeId.SATELLITE, google.maps.MapTypeId.HYBRID, google.maps.MapTypeId.TERRAIN, "{map.styledMapName}"); gme.mapSettings = id: 'gme-' + {map.uid}, title: '{map.title}', tooltipTitle: '{map.tooltipTitle}', CSSClass: '{map.class}', width: '{map.width}', height: '{map.height}', zoom: {f:if(condition:"{map.zoom}", then:"{map.zoom}", else:"0")}, minZoom: {f:if(condition:"{map.zoomMin}", then:"{map.zoomMin}", else:"0")}, maxZoom: {f:if(condition:"{map.zoomMax}", then:"{map.zoomMax}", else:"0")}, kmlUrl: '{map.kmlUrl}', kmlPreserveViewport: {f:if(condition:"{map.kmlPreserveViewport}", then:"true", else:"false")}, kmlLocal: {f:if(condition:"{map.kmlLocal}", then:"1", else:"0")}, scrollZoom: {f:if(condition:"{map.scrollZoom}", then:"1", else:"0")}, draggable: {f:if(condition:"{map.draggable}", then:"1", else:"0")}, doubleClickZoom: {f:if(condition:"{map.doubleClickZoom}", then:"0", else:"1")}, markerCluster: {f:if(condition:"{map.markerCluster}", then:"1", else:"0")}, markerClusterZoom: {f:if(condition:"{map.markerClusterZoom} > 0", then:"{map.markerClusterZoom}", else:"null")}, markerClusterSize: {f:if(condition:"{map.markerClusterSize} > 0", then:"{map.markerClusterSize}", else:"null")}, markerSearch: {f:if(condition:"{map.markerSearch}", then:"1", else:"0")}, defaultType: {map.defaultType}, panControl: {f:if(condition:"{map.panControl}", then:"1", else:"0")}, scaleControl: {f:if(condition:"{map.scaleControl}", then:"1", else:"0")}, streetviewControl: {f:if(condition:"{map.streetviewControl}", then:"1", else:"0")}, zoomControl: {f:if(condition:"{map.zoomControl}", then:"1", else:"0")}, zoomControlType: {map.zoomControlType}, mapTypeControl: {f:if(condition:"{map.mapTypeControl}", then:"1", else:"0")}, showRoute: {f:if(condition:"{map.showRoute}", then:"1", else:"0")}, calcRoute: {f:if(condition:"{map.calcRoute}", then:"1", else:"0")}, travelMode: {map.travelMode}, unitSystem: {map.unitSystem}, showForm: {f:if(condition:"{map.showForm}", then:"1", else:"0")}, showCategories: {f:if(condition:"{map.showCategories}", then:"1", else:"0")}, styledMapName: '{map.styledMapName}', styledMapCode: {map.styledMapCode}, styledMapCode: '', defaultZoom: 11 gme.mapSettings.mapTypes = new Array(); gme.mapSettings.mapTypes[{i.index}] = gme.defaultMapTypes[{type}]; gme.request = new Array(); gme.request['{k}'] = '{item}'; gme.addresses = new Array(); gme.addresses[{i.index}] = title: '{address.title}', latitude: {address.latitude}, longitude: {address.longitude}, address: '{address.address}', marker: '{f:if(condition:"{address.marker}" then:"uploads/tx_gomapsext/{address.marker}")}', imageSize: {f:if(condition:"{address.imageSize}", then:"1", else:"0")}, imageWidth: {address.imageWidth}, imageHeight: {address.imageHeight}, shadow: '{f:if(condition:"{address.shadow}" then:"uploads/tx_gomapsext/{address.shadow}")}', shadowSize: {f:if(condition:"{address.shadowSize}", then:"1", else:"0")}, shadowWidth: {address.shadowWidth}, shadowHeight: {address.shadowHeight}, infoWindowContent: '{address.infoWindowContent}', infoWindowLink: {address.infoWindowLink}, openByClick: 1, openByClick: {f:if(condition:"{address.openByClick}", then:"1", else:"0")}, closeByClick: 1, closeByClick: {f:if(condition:"{address.closeByClick}", then:"1", else:"0")}, opened: {f:if(condition:"{address.opened}", then:"1", else:"0")}, categories: '{category.uid}{f:if(condition:icat.isLast,then:'',else:',')}' gme.ll = {}; gme.ll.alert = ""; gme.ll.submit = ""; gme.ll.noSearchResults = ""; gme.ll.infoWindowLinkText = ""; var $element = jQuery("#" + gme.mapSettings.id); $element.gomapsext(gme); if(gme.mapSettings.width.indexOf('%') != -1) { jQuery(window).resize(function() { $element.trigger('mapresize'); }); } }); // end of closure })(jQuery, window, document);