PageSourceSearch

https://www.carotenoidspalma2026.org/js/widgets/mapsdgio/maps/bing/bing_mapizer.js

js carotenoidspalma2026.org collected 2026-10-08 18:55:08 UTC 7,531 bytes, 42 lines download raw bytes

1BingMapizer=function(config,mapOptions){this.baseconfig=config;this._class='BingMapizer';this.event_listeners={};return this.init(config.container,mapOptions,config.kml,config.marker);}
2BingMapizer.prototype=new Mapizer();BingMapizer.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.last_maptype=null;this.last_center=null;config.disableKeyboardInput=true;config.disableTouchInput=true;config.enableClickableLogo=false;config.showDashboard=false;config.showMapTypeSelector=false;config.showScaleBar=false;config.userInertia=false;var that=this;this.map=new Microsoft.Maps.Map(container,config);if(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':{w:parseInt(marker.icon[1]),h:parseInt(marker.icon[2])}};}
3else if(marker.icon.length==1){options.icon=marker.icon[0];}}
4this.addMarker(options);}}
5$(window).resize(function(){if(that.fullscreenActive)that._fullscreenResize();});this.container._map=this.map;return this;}
6BingMapizer.prototype.resize=function(){}
7BingMapizer.prototype.addControls=function(controls){}
8BingMapizer.prototype.removeControls=function(controls){}
9BingMapizer.prototype.show=function(){$(this.container).show();}
10BingMapizer.prototype.hide=function(){$(this.container).hide();}
11BingMapizer.prototype.zoomIn=function(){var zoom=this.map.getZoom();var new_zoom=zoom+1;if(new_zoom>this.maxZoomLevel)new_zoom=this.maxZoomLevel;this.map.setView({zoom:new_zoom,center:this.map.getCenter(),mapTypeId:this.map.getMapTypeId()});}
12BingMapizer.prototype.zoomOut=function(){var zoom=this.map.getZoom();var new_zoom=zoom-1;if(new_zoom<this.minZoomLevel)new_zoom=this.minZoomLevel;this.map.setView({zoom:new_zoom,center:this.map.getCenter(),mapTypeId:this.map.getMapTypeId()});}
13BingMapizer.prototype.setZoom=function(zoom){if(zoom>this.maxZoomLevel)zoom=this.maxZoomLevel;else if(zoom<this.minZoomLevel)zoom=this.minZoomLevel;this.map.setView({zoom:new_zoom,center:this.map.getCenter(),mapTypeId:this.map.getMapTypeId()});}
14BingMapizer.prototype.setMaxZoom=function(zoom){}
15BingMapizer.prototype.setMinZoom=function(zoom){}
16BingMapizer.prototype.setCenter=function(lat,lng){this.map.setView({zoom:this.getZoom(),center:new Microsoft.Maps.Location(lat,lng),mapTypeId:this.map.getMapTypeId()});}
17BingMapizer.prototype.getCenter=function(){var center=this.map.getCenter();return{lat:center.latitude,lng:center.longitude}}
18BingMapizer.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;var position=new Microsoft.Maps.Location(parseFloat(options.lat),parseFloat(options.lng));if(options.title)marker_options.title=options.title;if(options.icon&&typeof options.icon=='object'){marker_options.icon=options.icon.icon;marker_options.width=options.icon.size.w;marker_options.height=options.icon.size.h;}
19else if(options.icon&&typeof options.icon=='string')marker_options.icon=options.icon;var marker=new Microsoft.Maps.Pushpin(position,marker_options);marker._mapizer_id=marker_id;this.markers.marker_id=marker;this.map.entities.push(marker);var that=this;if(options.text&&typeof options.text!='undefined'){var infoboxOptions={title:options.title||'',description:options.text,visible:false,offset:new Microsoft.Maps.Point(0,15)};var infobox=new Microsoft.Maps.Infobox(marker.getLocation(),infoboxOptions);this.map.entities.push(infobox);marker._microsoft_click_handler=Microsoft.Maps.Events.addHandler(marker,'click',function(evt){infobox.setOptions({visible:true});});}
20this.last_marker=marker;return marker;}
21BingMapizer.prototype.removeMarker=function(marker){}
22BingMapizer.prototype.getMarkerPosition=function(marker){if(typeof marker=='undefined'){if(typeof this.last_marker!='undefined'&&this.last_marker!=null){var markerposition=this.last_marker.getLocation();return{lat:markerposition.latitude,lng:markerposition.longitude};}
23else return{lat:'',lng:''};}
24else if(typeof marker=='integer'){if(typeof this.markers.marker!='undefined'){var markerposition=this.markers.marker.getLocation();return{lat:markerposition.latitude,lng:markerposition.longitude};}
25else return{lat:'',lng:''};}
26else if(typeof marker=='object'&&marker!=null&&typeof marker.getLocation=='function'){var markerposition=marker.getLocation();return{lat:markerposition.latitude,lng:markerposition.longitude};}
27else return{lat:'',lng:''};}
28BingMapizer.prototype.inverseGeocode=function(position){if(typeof position=='object'&&typeof position.lat!='undefined'&&typeof position.lng!='undefined'){return position.lat+','+position.lng;}
29else return'not valid position';}
30BingMapizer.prototype.openInfoWindow=function(message,lat,lng){}
31BingMapizer.prototype.closeInfoWindow=function(){}
32BingMapizer.prototype.setMapType=function(mapType){this.map.setMapType(mapType);}
33BingMapizer.prototype.getMapType=function(){return this.map.getMapTypeId();}
34BingMapizer.prototype.destroy=function(){this.hide();var m=this.baseconfig.mapsdgio;var id=this.baseconfig.container_id;var container=this.container;this.map.dispose();setTimeout(function(){delete(mapsdgio.maps[id]);$(container).parents('.map').remove();},100);}
35BingMapizer.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')
36setTimeout(function(){$(container_parent).css({position:'static'});that.resize();},100);}
37else
38$(container_parent).css(this._last_container_properties);this.resize();delete(this._last_container_properties);this.fullscreenActive=false;}catch(e){this.hide();return false;}}
39else{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')}
40$(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;}}}
41BingMapizer.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.