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
|
var couche = viewer.getMap().addLayer(
"GPX",
couche, //nom couche
valeur, //nom fichier
{
styleMap:StyleMarqueurs,
visibility: true,
panMapIfOutOfView:false,
originators: [
{
logo:'OM',
pictureUrl: 'OM.JPG',
}],
//eventListeners:{
// "loadend":kmlLoadend1
//},
minZoomLevel: 0,
maxZoomLevel: 20
},
{
formatOptions:{
extractStyles:false // desactivation des styles
},
onSelect: ouvrePopup,
onUnselect: outPopup,
hover: false
}
);
gpxtab.push(couche);
var popupCtrlOpts= OpenLayers.Util.extend( viewer.getMap().getPopupDefaults('GPX'), {
onSelect:ouvrePopup,
onUnselect:fermePopup
});
var popupCtrl= new OpenLayers.Control.SelectFeature(gpxtab,popupCtrlOpts);
viewer.getMap().addControl(popupCtrl);
popupCtrl.activate(); |
Partager