var a=""); } return false; } ); var bounds = new OpenLayers.Bounds(576843.017384505,315571.928832789,597687.092701651,338587.016358607).transform(stereo70,geographic); var initialZoomBounds=new OpenLayers.Bounds(576843.017384505,315571.928832789,597687.092701651,338587.016358607).transform(stereo70,geographic); highlightStyle=new OpenLayers.Style({ strokeWidth : '3', strokeColor : '#3300CC', strokeOpacity : '0.7', strokeDashstyle : 'solid', fillColor : '#3399CC', fillOpacity : '0.6', pointRadius : '6' }); var options = { controls: [], maxExtent: bounds, resolutions:[89.98686607710147, 44.993433038550734, 22.496716519275367, 11.248358259637683, 5.624179129818842, 2.812089564909421, 1.4060447824547104, 0.7030223912273552, 0.3515111956136776, 0.1757555978068388,0.0878777989034194], // maxResolution: 1024.98046875, maxResolution: 256, projection: epsg, units: 'm' }; map = new OpenLayers.Map( options); if ("4" =='7'){ zoomMax=7; map.isValidZoomLevel = function (zoomLevel) { return zoomLevel>=0 && zoomLevel<=7; } } if ("4" =='1'){ zoomMax=9; map.isValidZoomLevel = function (zoomLevel) { return zoomLevel>=0 && zoomLevel<=9; } } if ("4" =='2'){ zoomMax=9; map.isValidZoomLevel = function (zoomLevel) { return zoomLevel>=0 && zoomLevel<=9; } } if ("4" =='3'){ zoomMax=9; map.isValidZoomLevel = function (zoomLevel) { return zoomLevel>=0 && zoomLevel<=9; } } if ("4" =='5'){ zoomMax=9; map.isValidZoomLevel = function (zoomLevel) { return zoomLevel>=0 && zoomLevel<=9; } } if ("4" =='6'){ zoomMax=9; map.isValidZoomLevel = function (zoomLevel) { return zoomLevel>=0 && zoomLevel<=9; } } if ("4" =='8'){ zoomMax=9; map.isValidZoomLevel = function (zoomLevel) { return zoomLevel>=0 && zoomLevel<=9; } } if ("4" =='9'){ zoomMax=9; map.isValidZoomLevel = function (zoomLevel) { return zoomLevel>=0 && zoomLevel<=9; } } if ("4" =='10'){ zoomMax=9; map.isValidZoomLevel = function (zoomLevel) { return zoomLevel>=0 && zoomLevel<=9; } } if ("4" =='11'){ zoomMax=9; map.isValidZoomLevel = function (zoomLevel) { return zoomLevel>=0 && zoomLevel<=9; } } if ("4" =='4'){ zoomMax=9; map.isValidZoomLevel = function (zoomLevel) { return zoomLevel>=0 && zoomLevel<=9; } } OpenLayers.Util.onImageLoadErrorColor = "transparent"; map.addControl(new OpenLayers.Control.MousePosition( {id: "ll_mouse", formatOutput: formatLonlats} )); insertBaseLayer(); if("4" == 6) radalert("Revizuirea Planului Urbanistic General este în etapa de documentare si elaborare a studiilor de fundamentare. Cerintele si optiunile publicului sunt obtinute de elaboratorul documentatiei de urbanism prin metode de cercetare sociologică relevante pentru obiectivele propuse.", 500, 170, ""); createGoogleSatelite(0, "Fundal arbori"); untiled[0].googleEarth = ''; untiled[0].cucuRucu = '1'; createRasterLayerX(1, "4", "Institutii", "Proxy.aspx", "V_FISA_INST", "pmb", "1", "5000", "cbLegenda" + "V_FISA_INST","badabum", ""); untiled[1].googleEarth = ''; untiled[1].cucuRucu = '1'; createRasterLayerX(2, "4", "Paduri, paduri de agrement", "Proxy.aspx", "V_FISA_SPVC_111", "pmb", "1", "20000", "cbLegenda" + "V_FISA_SPVC_111","badabum", ""); untiled[2].googleEarth = ''; untiled[2].cucuRucu = '1'; createRasterLayerX(3, "4", "Gradini (botanica, zoologica)", "Proxy.aspx", "V_FISA_SPVC_107", "pmb", "1", "20000", "cbLegenda" + "V_FISA_SPVC_107","badabum", ""); untiled[3].googleEarth = ''; untiled[3].cucuRucu = '1'; createRasterLayerX(4, "4", "Baze de agrement, complexuri si baze sportive", "Proxy.aspx", "V_FISA_SPVC_102", "pmb", "1", "20000", "cbLegenda" + "V_FISA_SPVC_102","badabum", ""); untiled[4].googleEarth = ''; untiled[4].cucuRucu = '1'; createRasterLayerX(5, "4", "Parc, parc sportiv, parc expozitional", "Proxy.aspx", "V_FISA_SPVC_112", "pmb", "1", "20000", "cbLegenda" + "V_FISA_SPVC_112","badabum", ""); untiled[5].googleEarth = ''; untiled[5].cucuRucu = '1'; createVectorLayer(6, "4", "Spatii verzi", "Proxy.aspx", "V_CV_SPAVER", "GEOMETRY1", "pmb.ro", "pmb", '', "1", "2500", "cbLegenda" + "V_CV_SPAVER", 0, "", "", "False"); snapableVectorLayers.push(untiled[6]); untiled[6].googleEarth = ''; untiled[6].cucuRucu = '1'; createVectorLayer(7, "4", "Teren proprietate privata", "Proxy.aspx", "CV_PR_PRIVAT", "GEOMETRY1", "pmb.ro", "pmb", '', "1", "2500", "cbLegenda" + "CV_PR_PRIVAT", 0, "", "", "False"); snapableVectorLayers.push(untiled[7]); untiled[7].googleEarth = ''; untiled[7].cucuRucu = '1'; createVectorLayer(8, "4", "Spatiu verde", "Proxy.aspx", "V_M_CADVER", "GEOMETRY1", "pmb.ro", "pmb", '', "1", "10000", "cbLegenda" + "V_M_CADVER", 0, "", "", "False"); snapableVectorLayers.push(untiled[8]); untiled[8].googleEarth = ''; untiled[8].cucuRucu = '1'; createVectorLayer(9, "4", "Institutii", "Proxy.aspx", "V_FISA_INST", "GEOMETRY1", "pmb.ro", "pmb", '', "1", "2500", "cbLegenda" + "V_FISA_INST", 0, "", "", "False"); snapableVectorLayers.push(untiled[9]); untiled[9].googleEarth = ''; untiled[9].cucuRucu = '1'; createRasterLayerX(10, "4", "Sectoare", "Proxy.aspx", "V_SECT_ADM", "pmb", "25000", "50000000", "cbLegenda" + "V_SECT_ADM","badabum", ""); untiled[10].googleEarth = ''; untiled[10].cucuRucu = '1'; createVectorLayer(11, "4", "Arbori", "Proxy.aspx", "V_CADVER_ARBORI", "GEOMETRY1", "pmb.ro", "pmb", '', "1", "1000", "cbLegenda" + "V_CADVER_ARBORI", 0, "", "", "False"); snapableVectorLayers.push(untiled[11]); untiled[11].googleEarth = ''; untiled[11].cucuRucu = '1'; var overCallback= {over: featureOver, out: hideTooltip}; highlightCtrl = new OpenLayers.Control.SelectFeature([untiled[6],untiled[7],untiled[8],untiled[9],untiled[11]], { hover: true, highlightOnly: true, renderIntent: "temporary" }); map.addControl(highlightCtrl); highlightCtrl.activate(); selectControl = new OpenLayers.Control.SelectFeature([untiled[6],untiled[7],untiled[8],untiled[9],untiled[11]],{callbacks: overCallback}); map.addControl(selectControl); selectControl.activate(); OpenLayers.loadURL("sld.xml", null, null, complete); var sketchSymbolizers = { "Point": { pointRadius: 4, graphicName: "square", fillColor: "white", fillOpacity: 1, strokeWidth: 1, strokeOpacity: 1, strokeColor: "#333333" }, "Line": { strokeWidth: 3 , strokeOpacity: 1, strokeColor: "#FF0000", strokeDashstyle: "dash" }, "Polygon": { strokeWidth: 2, strokeOpacity: 1, strokeColor: "#FF0000", fillColor: "#FF0000", fillOpacity: 0.3 } }; var style = new OpenLayers.Style(); style.addRules([ new OpenLayers.Rule({symbolizer: sketchSymbolizers}) ]); styleMapDraw = new OpenLayers.StyleMap({"default": style}); // build up all controls // --------------------- Adaugare controale --------------------- // Loading Panel var loadingpanel = new OpenLayers.Control.LoadingPanel({displayClass: "olControlLoadingPanel"}); //map.addControl(loadingpanel); map.addControl(new OpenLayers.Control.PanZoomBar({ position: new OpenLayers.Pixel(2, 15) })); map.addControl(new OpenLayers.Control.Navigation( {dragPanOptions: {enableKinetic: true}})); map.addControl(new OpenLayers.Control.MousePosition({ div: document.getElementById('mapMousePosition') })); map.addControl(new OpenLayers.Control.Scale('mapScale')); map.addControl(new OpenLayers.Control.ScaleLine()); // geolocation control var vector = new OpenLayers.Layer.Vector('vector'); map.addLayers([vector]); var pulsate = function(feature) { var point = feature.geometry.getCentroid(), bounds = feature.geometry.getBounds(), radius = Math.abs((bounds.right - bounds.left)/2), count = 0, grow = 'up'; var resize = function(){ if (count>16) { clearInterval(window.resizeInterval); } var interval = radius * 0.03; var ratio = interval/radius; switch(count) { case 4: case 12: grow = 'down'; break; case 8: grow = 'up'; break; } if (grow!=='up') { ratio = - Math.abs(ratio); } feature.geometry.resize(1+ratio, point); vector.drawFeature(feature); count++; }; window.resizeInterval = window.setInterval(resize, 50, point, radius); }; var geolocate = new OpenLayers.Control.Geolocate({ bind: false, geolocationOptions: { enableHighAccuracy: false, maximumAge: 0, timeout: 7000 } }); map.addControl(geolocate); var firstGeolocation = true; geolocate.events.register("locationupdated",geolocate,function(e) { vector.removeAllFeatures(); var circle = new OpenLayers.Feature.Vector( OpenLayers.Geometry.Polygon.createRegularPolygon( new OpenLayers.Geometry.Point(e.point.x, e.point.y), e.position.coords.accuracy/2, 40, 0 ), {}, style ); vector.addFeatures([ new OpenLayers.Feature.Vector( e.point, {}, { graphicName: 'cross', strokeColor: '#f00', strokeWidth: 2, fillOpacity: 0, pointRadius: 10 } ), circle ]); if (firstGeolocation) { map.zoomToExtent(vector.getDataExtent()); pulsate(circle); firstGeolocation = false; this.bind = true; } }); geolocate.events.register("locationfailed",this,function() { OpenLayers.Console.log('Location detection failed'); }); //overview map var layersClone=new Array(); for(var i=0;i0) map.removePopup(popup); if(map.getZoom()<2){map.zoomTo(2);} var radToolTip = $find("RadToolTip1"); var text_popup = event.text; text_popup = text_popup.replace(/î/g,'i') ; text_popup = text_popup.replace(/Å£/g,'t') ; text_popup = text_popup.replace(/ă/g,'a') ; text_popup = text_popup.replace(/Å/g,'S') ; text_popup = text_popup.replace(/î/g,'i') ; text_popup = text_popup.replace(/î/g,'i') ; radToolTip.set_text(text_popup); radToolTip.show(); } } }); map.addControl(info); info.activate(); var panel_top = new OpenLayers.Control.Panel({ defaultControl: drag_control }); map.addControl(panel_top); panel_top.addControls([drag_control, zoomBox, navHistory.previous, navHistory.next, separator1, zoomToContextExtent, refresh_button,separator2,measureControls.line,measureControls.polygon,separator3,info,print_button]); var cacheWrite = new OpenLayers.Control.CacheWrite({ autoActivate: true, imageFormat: "image/png", layers: cacheableLayers }); map.addControl(cacheWrite); var cacheRead = new OpenLayers.Control.CacheRead({layers: cacheableLayers}); map.addControl(cacheRead); map.addControl(new OpenLayers.Control.Attribution()); map.addControl(graticule); graticule.deactivate(); if(Browser.Version() >= 8) map.fractionalZoom = true; //if((document.location.href.indexOf("#") == -1) || (document.location.href.indexOf("lat=") == -1)) map.zoomToExtent(initialZoomBounds); map.addControl(new OpenLayers.Control.Permalink({anchor: true})); map.render("map"); if(map.getZoomForExtent(map.getExtent())"); defaultPageView.append("Amplasament: " + (geometry.feature.data.AMPLASAMENT != null ? geometry.feature.data.AMPLASAMENT : " -") +"
"); //defaultPageView.append("An elaborare: " + (geometry.feature.data.AN_AVIZARE != null ? geometry.feature.data.AN_AVIZARE : " -") +"
"); defaultPageView.append("
Aviz:
"); defaultPageView.append("Nr: " + (geometry.feature.data.NR_AVIZ != null ? geometry.feature.data.NR_AVIZ : " -") +"
"); defaultPageView.append("Data: " + (geometry.feature.data.DATA_AVIZ != null ? geometry.feature.data.DATA_AVIZ : " -") +"
"); if (geometry.feature.data.POZA_AVIZ != null) defaultPageView.append("Document atasat: Download
"); defaultPageView.append("
Hotarare:
"); defaultPageView.append("Nr: " + (geometry.feature.data.NR_HOTARARE != null ? geometry.feature.data.NR_HOTARARE : " -") +"
"); defaultPageView.append("Data: " + (geometry.feature.data.DATA_HOT != null ? geometry.feature.data.DATA_HOT : " -") +"
"); if (geometry.feature.data.POZA_HOTARARE != null) defaultPageView.append("Document atasat: Download
"); defaultPageView.append("
Regulament:
"); if (geometry.feature.data.REGULAMENT != null){ if(geometry.feature.data.REGULAMENT.substr((~-geometry.feature.data.REGULAMENT.lastIndexOf(".") >>> 0) + 2)!="") { defaultPageView.append("Document atasat: Download
"); }else{ var winds= geometry.feature.data.REGULAMENT.toLowerCase().replace('\\\\pmbfs1','').replace(/\\/g, '/').replace('/',''); defaultPageView.append("Document atasat: Download
"); } } defaultPageView.append("
Plansa:
"); if (geometry.feature.data.FISIER_POZA != null){ if(geometry.feature.data.FISIER_POZA.substr((~-geometry.feature.data.FISIER_POZA.lastIndexOf(".") >>> 0) + 2)!="") { defaultPageView.append("Document atasat: Download
"); }else{ var winds= geometry.feature.data.FISIER_POZA.toLowerCase().replace('\\\\pmbfs1','').replace(/\\/g, '/').replace('/',''); defaultPageView.append("Document atasat: Download
"); } } radTabDet.show(); } } } function toggleGraticule(checkbox) { if(checkbox.checked) graticule.activate(); else graticule.deactivate(); } function openChild(file) { childWindow=open(file,"Cauta","width=600,height=600,0,status=0,scrollbars=1,location=0"); if (childWindow.opener == null) childWindow.opener = self; } function handleMeasurements(event) { var geometry = event.geometry; var units = event.units; var order = event.order; var measure = event.measure; var element = document.getElementById('mapOutput'); var out = ""; if(order == 1) { out += "Distanta: " + measure.toFixed(3) + " " + units; // if (map.getProjection() == epsg) { // out += ", Great Circle Distance: " + // calcVincenty(geometry).toFixed(3) + " km"; // } } else { out += "Arie: " + measure.toFixed(3) + " " + units + "2"; } element.innerHTML = out; } function refreshMap(){ untiled[0].redraw(); untiled[1].redraw(); untiled[2].redraw(); untiled[3].redraw(); untiled[4].redraw(); untiled[5].redraw(); untiled[6].redraw(); untiled[7].redraw(); untiled[8].redraw(); untiled[9].redraw(); untiled[10].redraw(); untiled[11].redraw(); }; // sets the HTML provided into the nodelist element function setHTML(response){ //document.getElementById('nodelist').innerHTML += response.responseText; }; // shows/hide the control panel function toggleControlPanel(event){ var toolbar = document.getElementById("toolbar"); if (toolbar.style.display == "none") { toolbar.style.display = "block"; } else { toolbar.style.display = "none"; } event.stopPropagation(); map.updateSize(); } function selectFeature(id, idcol, table) { var tooltip = Telerik.Web.UI.RadToolTip.getCurrent(); if (tooltip) { tooltip.hide(); } if(map.getLayerIndex(selection_layer)!=-1) map.removeLayer(selection_layer); selection_layer = new OpenLayers.Layer.Vector(table, { strategies: [new OpenLayers.Strategy.BBOX()], displayInLayerSwitcher: false, projection: geographic, protocol: new OpenLayers.Protocol.WFS({ url: "Proxy.aspx?zx_xz=1&xz_zx=0&", featureType: table, //extractAttributes:true, features: "GEOMETRY1", srsName: epsg, featureNS: "pmb.ro", featurePrefix: "pmb", geometryName: "GEOMETRY1" }), styleMap: new OpenLayers.StyleMap({ strokeWidth: 6, strokeColor: "#008888", fillColor: "#00DDDD", fillOpacity: 0.5, pointerEvents: "visiblePainted", pointRadius : '3' }), //commitReport: goToExtent, filter: new OpenLayers.Filter.Logical({ type: OpenLayers.Filter.Logical.OR, filters: [ new OpenLayers.Filter.Comparison({ type: OpenLayers.Filter.Comparison.EQUAL_TO, property: idcol, value: id }) ] })}); map.addLayer(selection_layer); selection_layer.events.register("loadend", selection_layer, goToExtent); if(map.popups.length>0) map.removePopup(popup); selection_layer.redraw(); document.getElementById('deselecteaza').disabled = false; } function selectFeatureBBox(id, idcol, table,xmin,ymin,xmax,ymax, zoom) { searchResultBounds=new OpenLayers.Bounds(xmin,ymin,xmax,ymax); var bboxzoom = map.getZoomForExtent(searchResultBounds); if(bboxzoomzoomMax){ zoom=zoomMax; } map.zoomTo(zoom); var originalZoom=map.getZoom(); var zoomLevel=map.getZoom(); var mapbounds=map.getExtent(); map.centerLayerContainer(searchResultBounds.getCenterLonLat()); map.panTo(searchResultBounds.getCenterLonLat()); selected_zoom = zoom; selectFeature(id, idcol, table); } function openChild(file) { childWindow=open(file,"Cauta","width=600,height=600,0,status=0,scrollbars=1,location=0"); if (childWindow.opener == null) childWindow.opener = self; } function goToExtent() { //map.zoomToExtent(selection_layer.getDataExtent()); //var zoom = map.getZoomForExtent(selection_layer.getDataExtent()); //if(selected_zoom!=0) //{ // if(selected_zoom>zoom) selected_zoom = zoom; // map.zoomTo(selected_zoom); // selected_zoom=0; //} } function setPalette(mode){ if (mode == '') { untiled[0].mergeNewParams({ palette: null }); untiled[1].mergeNewParams({ palette: null }); untiled[2].mergeNewParams({ palette: null }); untiled[3].mergeNewParams({ palette: null }); untiled[4].mergeNewParams({ palette: null }); untiled[5].mergeNewParams({ palette: null }); untiled[6].mergeNewParams({ palette: null }); untiled[7].mergeNewParams({ palette: null }); untiled[8].mergeNewParams({ palette: null }); untiled[9].mergeNewParams({ palette: null }); untiled[10].mergeNewParams({ palette: null }); untiled[11].mergeNewParams({ palette: null }); } else { untiled[0].mergeNewParams({ palette: mode }); untiled[1].mergeNewParams({ palette: mode }); untiled[2].mergeNewParams({ palette: mode }); untiled[3].mergeNewParams({ palette: mode }); untiled[4].mergeNewParams({ palette: mode }); untiled[5].mergeNewParams({ palette: mode }); untiled[6].mergeNewParams({ palette: mode }); untiled[7].mergeNewParams({ palette: mode }); untiled[8].mergeNewParams({ palette: mode }); untiled[9].mergeNewParams({ palette: mode }); untiled[10].mergeNewParams({ palette: mode }); untiled[11].mergeNewParams({ palette: mode }); } ///////////////////////////////////////////////////////////////////////////////////// } // Set a style for the given layer: function setLayerStyle(layerName, index, layer) { //alert('set style'); var sldLayerName = sld.namedLayers[layerName]; if(sldLayerName) { var customStyle=sld.namedLayers[layerName].userStyles[index]; layer.styleMap.styles['default']=customStyle; layer.styleMap.styles['temporary']=highlightStyle; layer.redraw(); } } function complete(req) { //alert('complete fct'); sld = formatSLD.read(req.responseXML || req.responseText); //parcurg vectorii setLayerStyle("Spatii verzi",0,untiled[6]); setLayerStyle("Teren proprietate privata",0,untiled[7]); setLayerStyle("Spatiu verde",0,untiled[8]); setLayerStyle("Institutii",0,untiled[9]); setLayerStyle("Arbori",0,untiled[11]); } function setWidth(size){ var mapDiv = document.getElementById('map'); var wrapper = document.getElementById('wrapper'); if (size == "auto") { // reset back to the default value mapDiv.style.width = null; wrapper.style.width = null; } else { mapDiv.style.width = size + "px"; wrapper.style.width = size + "px"; } // notify OL that we changed the size of the map div map.updateSize(); } function setHeight(size){ var mapDiv = document.getElementById('map'); if (size == "auto") { // reset back to the default value mapDiv.style.height = null; } else { mapDiv.style.height = size + "px"; } // notify OL that we changed the size of the map div map.updateSize(); } function updateFilter(){ } function resetFilter() { } function mergeNewParams(params){ untiled[0].mergeNewParams(params); untiled[1].mergeNewParams(params); untiled[2].mergeNewParams(params); untiled[3].mergeNewParams(params); untiled[4].mergeNewParams(params); untiled[5].mergeNewParams(params); untiled[6].mergeNewParams(params); untiled[7].mergeNewParams(params); untiled[8].mergeNewParams(params); untiled[9].mergeNewParams(params); untiled[10].mergeNewParams(params); untiled[11].mergeNewParams(params); } function getColors() { alert(untiled[0].params.LAYERS); alert('Culoare '+untiled[0].features[0].attributes.id_af_plan); //for (var pr in untiled[0].features[0].attributes) // { // alert(pr); // } } function clearSelection() { if(map.getLayerIndex(selection_layer)!=-1) map.removeLayer(selection_layer); document.getElementById('deselecteaza').disabled = "disabled"; } function featureOver(feature) { var radToolTip = $find("RadToolTip1"); if(!radToolTip.isVisible()) { var fname=''; var title = ''; if(feature.layer.name=='Spatii verzi'){ title = 'Spatii verzi'; fname = fname + '
    '; fname = fname + "
  • Nume: "; if(feature.attributes.SPAVER_DEN!=null) fname = fname + feature.attributes.SPAVER_DEN +"
  • "; else fname = fname + "- "; fname = fname + "
";} if(feature.layer.name=='Teren proprietate privata'){ title = 'Teren proprietate privata'; fname = fname + '
    '; fname = fname + "
  • Teren proprietate privata "; if(feature.attributes.SPAVER_loc!=null) fname = fname + feature.attributes.SPAVER_loc +"
  • "; else fname = fname + "- "; fname = fname + "
";} if(feature.layer.name=='Spatiu verde'){ title = 'Spatiu verde'; fname = fname + '
    '; fname = fname + "
  • Categorie: "; if(feature.attributes.CATEGFOL!=null) fname = fname + feature.attributes.CATEGFOL +"
  • "; else fname = fname + "- "; fname = fname + "
  • Tip: "; if(feature.attributes.TIP!=null) fname = fname + feature.attributes.TIP +"
  • "; else fname = fname + "- "; fname = fname + "
  • Denumire: "; if(feature.attributes.SPVC_DEN!=null) fname = fname + feature.attributes.SPVC_DEN +"
  • "; else fname = fname + "- "; fname = fname + "
  • Zona: "; if(feature.attributes.LIM_DEN!=null) fname = fname + feature.attributes.LIM_DEN +"
  • "; else fname = fname + "- "; fname = fname + "
  • Strada: "; if(feature.attributes.ARTERE_NUME!=null) fname = fname + feature.attributes.ARTERE_NUME +"
  • "; else fname = fname + "- "; fname = fname + "
  • Adresa: "; if(feature.attributes.SPVC_NR!=null) fname = fname + feature.attributes.SPVC_NR +"
  • "; else fname = fname + "- "; fname = fname + "
";} if(feature.layer.name=='Institutii'){ title = 'Institutii'; fname = fname + '
    '; fname = fname + "
  • Categorie: "; if(feature.attributes.CATEGFOL!=null) fname = fname + feature.attributes.CATEGFOL +"
  • "; else fname = fname + "- "; fname = fname + "
  • Denumire: "; if(feature.attributes.INST_DEN!=null) fname = fname + feature.attributes.INST_DEN +"
  • "; else fname = fname + "- "; fname = fname + "
  • Tip: "; if(feature.attributes.TIP!=null) fname = fname + feature.attributes.TIP +"
  • "; else fname = fname + "- "; fname = fname + "
  • Zona: "; if(feature.attributes.LIM_DEN!=null) fname = fname + feature.attributes.LIM_DEN +"
  • "; else fname = fname + "- "; fname = fname + "
  • Strada: "; if(feature.attributes.ARTERE_NUME!=null) fname = fname + feature.attributes.ARTERE_NUME +"
  • "; else fname = fname + "- "; fname = fname + "
  • Adresa: "; if(feature.attributes.INST_NR!=null) fname = fname + feature.attributes.INST_NR +"
  • "; else fname = fname + "- "; fname = fname + "
";} if(feature.layer.name=='Arbori'){ title = 'Arbori'; fname = fname + '
    '; fname = fname + "
  • Denumire populara: "; if(feature.attributes.TIP!=null) fname = fname + feature.attributes.TIP +"
  • "; else fname = fname + "- "; fname = fname + "
  • Denumire stiintifica: "; if(feature.attributes.TIPST!=null) fname = fname + feature.attributes.TIPST +"
  • "; else fname = fname + "- "; fname = fname + "
  • Inaltime: "; if(feature.attributes.INALTIME_TEXT!=null) fname = fname + feature.attributes.INALTIME_TEXT +"
  • "; else fname = fname + "- "; fname = fname + "
  • Grosime: "; if(feature.attributes.GROSIME!=null) fname = fname + feature.attributes.GROSIME +"
  • "; else fname = fname + "- "; fname = fname + "
";} var xy = this.map.getControl('ll_mouse').lastXy || new OpenLayers.Pixel(0,0); showTooltip(fname,title,xy.x,xy.y, feature); } } function showTooltip(ttText, title,x,y,feature) { var o = document.getElementById('tooltip'); o.style.left = x + 'px'; o.style.top = y + 'px'; var radToolTip = $find("RadToolTip2"); radToolTip.hide(); radToolTip.set_text(ttText); radToolTip.set_title(title); radToolTip.show(); } function hideTooltip() { var radToolTip = $find("RadToolTip2"); radToolTip.hide(); } //non-OL-related functions function getViewport() { var e = window, a = 'inner'; if ( !( 'innerWidth' in window ) ) { a = 'client'; e = document.documentElement || document.body; } return { width : e[ a+'Width' ], height : e[ a+'Height' ] } } function onPopupClose(feature) { selectControl.unselect(feature); } function onFeatureUnselect(feature) { if(feature.popup!=null) { map.removePopup(feature.popup); feature.popup.destroy(); //feature.attributes.poppedup = false; feature.popup = null; } } // insert base layer invizibil in legenda function insertBaseLayer() { var baseLayerOptions = { isBaseLayer: true, displayInLayerSwitcher: true }; var fake = new OpenLayers.Layer('fake', baseLayerOptions); map.addLayer(fake); } // afisare lat/lon in harta function formatLonlats(lonLat) { var lat = lonLat.lat; var lg = lonLat.lon; var ns = OpenLayers.Util.getFormattedLonLat(lat); var ew = OpenLayers.Util.getFormattedLonLat(lg,'lon'); return ns + ', ' + ew + ' (' + (Math.round(lat * 10000) / 10000) + ', ' + (Math.round(lg * 10000) / 10000) + ')'; } var b = "";