1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| function initGeoportalMap() {
geoportalLoadviewer("GeoportalviewerDiv", "normal", 'FXX', null, null);
viewer.addGeoportalLayer('GEOGRAPHICALGRIDSYSTEMS.MAPS:WMSC', {opacity:1.0});
//prereglage de la carte
viewer.openLayersPanel(true);
viewer.setLayersPanelVisibility(true);
viewer.setToolsPanelVisibility(false);
viewer.setInformationPanelVisibility(false);
viewer.getMap().addLayer("KML","Haut-Lignon","./kml/0743popupV7.kml",
{ preFeatureInsert: function(f) {
if (f) {
Geoportal.Popup.setPointerCursorForFeature(f);
OpenLayers.Util.extend(f.style, {
label: f.attributes.name,//f.attributes['NOM'].value
// labelBackgroundColor:'yellow',
labelAlign: "rb",
fontColor: "blue",
fontWeight: "bold",
fontSize: "30px",
fontFamily: "Courier New, monospace"
});
}
},
//projection:OpenLayers.Projection.CRS84,//always set projection when setting maxExtent
// maxExtent:new OpenLayers.Bounds(-180, -90, 180, 90),
minZoomLevel: 0,//7
maxZoomLevel:20,
visibility: true
},
{
onSelect:function(f){},
onUnselect:function(f){} //default OpenLayers : do nothing
});
viewer.getMap().setCenterAtLonLat(4.3231201,45.0657615, 10);
} |
Partager