PageSourceSearch

https://www.carotenoidspalma2026.org/js/widgets/mapsdgio/maps/gmaps/google_mapizer.js

js carotenoidspalma2026.org collected 2026-10-08 18:55:05 UTC 8,014 bytes, 42 lines download raw bytes

1GoogleMapizer=function(config,mapOptions){this.baseconfig=config;this._class='GoogleMapizer';this.event_listeners={};return this.init(config.container,mapOptions,config.kml,config.marker);}
2GoogleMapizer.prototype=new Mapizer();GoogleMapizer.prototype.init=function(container,config,kml,marker){this.mapconfig=config;this.container=container;this.container_id=$(container).attr('id');this.container_parent=$(container).parents('.map')[0];this.maxZoomLevel=20;this.minZoomLevel=1;this.markers={};this.last_marker_id=0;this.last_marker=null;this.map=new google.maps.Map(container,config);if(kml){var kml=new google.maps.KmlLayer(kml);kml.setMap(this.map);google.maps.event.addListener(kml,"defaultviewport_changed",function(){var viewport=kml.getDefaultViewport();if(typeof marker!='undefined'&&typeof marker.position!='undefined')
3viewport.extend(new google.maps.LatLng(parseFloat(marker.position[0]),parseFloat(marker.position[1])));this.map.fitBounds(viewport);});}
4if(marker&&typeof marker!='undefined'){var options={};if(typeof marker.position!='undefined'){options.lat=parseFloat(marker.position[0]);options.lng=parseFloat(marker.position[1]);if(marker.text&&typeof marker.text!='undefined')options.text=marker.text;if(marker.title&&typeof marker.title!='undefined')options.title=marker.title;if(marker.icon&&typeof marker.icon!='undefined'){if(marker.icon.length==7){options.icon={'icon':marker.icon[0],'size':new google.maps.Size(parseInt(marker.icon[1]),parseInt(marker.icon[2])),'origin':new google.maps.Point(parseInt(marker.icon[3]),parseInt(marker.icon[4])),'anchor':new google.maps.Point(parseInt(marker.icon[5]),parseInt(marker.icon[6]))};}
5else if(marker.icon.length==1){options.icon=marker.icon[0];}}
6this.addMarker(options);}}
7this.container._map=this.map;var that=this;$(window).resize(function(){if(that.fullscreenActive)that._fullscreenResize();});return this;}
8GoogleMapizer.prototype.resize=function(){var center=this.map.getCenter();google.maps.event.trigger(this.map,'resize');this.map.setCenter(center);}
9GoogleMapizer.prototype.addControls=function(controls){}
10GoogleMapizer.prototype.removeControls=function(controls){}
11GoogleMapizer.prototype.show=function(){$(this.container).show();}
12GoogleMapizer.prototype.hide=function(){$(this.container).hide();}
13GoogleMapizer.prototype.zoomIn=function(){var zoom=this.map.getZoom();var new_zoom=zoom+1;if(new_zoom>this.maxZoomLevel)new_zoom=this.maxZoomLevel;this.map.setZoom(new_zoom);}
14GoogleMapizer.prototype.zoomOut=function(){var zoom=this.map.getZoom();var new_zoom=zoom-1;if(new_zoom<this.minZoomLevel)new_zoom=this.minZoomLevel;this.map.setZoom(new_zoom);}
15GoogleMapizer.prototype.setZoom=function(zoom){if(zoom>this.maxZoomLevel)zoom=this.maxZoomLevel;else if(zoom<this.minZoomLevel)zoom=this.minZoomLevel;this.map.setZoom(zoom);}
16GoogleMapizer.prototype.setMaxZoom=function(zoom){}
17GoogleMapizer.prototype.setMinZoom=function(zoom){}
18GoogleMapizer.prototype.setCenter=function(lat,lng){this.map.setCenter(lat,lng);}
19GoogleMapizer.prototype.getCenter=function(){var center=this.map.getCenter();return{lat:center.lat(),lng:center.lng()}}
20GoogleMapizer.prototype.addMarker=function(options){var marker_id=this.last_marker_id;this.last_marker_id++;var marker_options={};marker_options._mapizer_id=marker_id;marker_options.map=this.map;marker_options.position=new google.maps.LatLng(parseFloat(options.lat),parseFloat(options.lng));if(options.title)marker_options.title=options.title;if(options.icon&&typeof options.icon=='object')marker_options.icon=new google.maps.MarkerImage(options.icon.icon,options.icon.size,options.icon.origin,options.icon.anch
20or);else if(options.icon&&typeof options.icon=='string')marker_options.icon=options.icon;var marker=new google.maps.Marker(marker_options);marker._mapizer_id=marker_id;this.markers.marker_id=marker;var that=this;if(options.text&&typeof options.text!='undefined'){google.maps.event.addListener(marker,'click',function(){var position=marker.getPosition();if(typeof that.infoWindow!='undefined'){that.closeInfoWindow();}else{that.openInfoWindow('<div class="info_text">'+options.text+'</div>',position.lat(),position.lng());}});}
21this.last_marker=marker;return marker;}
22GoogleMapizer.prototype.removeMarker=function(marker){}
23GoogleMapizer.prototype.getMarkerPosition=function(marker){if(typeof marker=='undefined'){if(typeof this.last_marker!='undefined'&&this.last_marker!=null){var markerposition=this.last_marker.getPosition();return{lat:markerposition.lat(),lng:markerposition.lng()};}
24else return{lat:'',lng:''};}
25else if(typeof marker=='integer'){if(typeof this.markers.marker!='undefined'){var markerposition=this.markers.marker.getPosition();return{lat:markerposition.lat(),lng:markerposition.lng()};}
26else return{lat:'',lng:''};}
27else if(typeof marker=='object'&&marker!=null&&typeof marker.getPosition=='function'){var markerposition=marker.getPosition();return{lat:markerposition.lat(),lng:markerposition.lng()};}
28else return{lat:'',lng:''};}
29GoogleMapizer.prototype.inverseGeocode=function(position){if(typeof position=='object'&&typeof position.lat!='undefined'&&typeof position.lng!='undefined'){return position.lat+','+position.lng;}
30else return'not valid position';}
31GoogleMapizer.prototype.openInfoWindow=function(message,lat,lng){var that=this;var position=(typeof lat!='undefined'&&typeof lng!='undefined')?new google.maps.LatLng(lat,lng):null;this.infoWindow=new google.maps.InfoWindow({content:message,maxWidth:parseInt($(this.map.getDiv()).width()*0.7)});if(position!=null)this.infoWindow.setPosition(position);this.infoWindow.open(this.map);google.maps.event.addListener(this.infoWindow,'closeclick',function(){delete(that.infoWindow);});}
32GoogleMapizer.prototype.closeInfoWindow=function(){if(typeof this.infoWindow!='undefined'){this.infoWindow.close();delete(this.infoWindow);}}
33GoogleMapizer.prototype.setMapType=function(mapType){this.map.setMapTypeId(mapType);}
34GoogleMapizer.prototype.getMapType=function(){return this.map.getMapTypeId();}
35GoogleMapizer.prototype.destroy=function(){this.hide();var m=this.baseconfig.mapsdgio;var id=this.baseconfig.container_id;var container=this.container;setTimeout(function(){delete(mapsdgio.maps[id]);$(container).parents('.map').remove();},100);}
36GoogleMapizer.prototype.fullScreen=function(){var container_parent=$(this.container).parents('.map')[0];if(this.fullscreenActive){try{if($.browser.msie){$(container_parent).css({'z-index':this._last_container_properties['z-index'],'width':this._last_container_properties['width'],'height':this._last_container_properties['height'],'float':this._last_container_properties['float'],'top':this._last_container_properties['top'],'left':this._last_container_properties['left']});var that=this;if(this._last_container_properties!='absolute'&&this._last_container_properties!='fixed')
37setTimeout(function(){$(container_parent).css({position:'static'});that.resize();},100);}
38else
39$(container_parent).css(this._last_container_properties);this.resize();delete(this._last_container_properties);this.fullscreenActive=false;}catch(e){this.hide();return false;}}
40else{try{this._last_container_properties={'z-index':$(container_parent).css('z-index'),'width':$(container_parent).css('width'),'height':$(container_parent).css('height'),'position':$(container_parent).css('position'),'top':$(container_parent).css('top'),'left':$(container_parent).css('left'),'float':$(container_parent).css('float')};$(container_parent).css({'z-index':9999,'width':$(window).width()+'px','height':$(window).height()+'px','position':'fixed','top':'0px','left':'0px'});this.resize();this.fullscreenActive=true;}catch(e){console.log(e);this.hide();return false;}}}
41GoogleMapizer.prototype._fullscreenResize=function(){var container_parent=$(this.container).parents('.map')[0];try{$(container_parent).css({'z-index':9999,'width':$(window).width()+'px','height':$(window).height()+'px','position':'fixed','top':'0px','left':'0px'});this.resize();}catch(e){console.log(e);this.hide();return false;}
42return true;}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.