User Tools

Site Tools


tecnica:gps_cartografia_gis:openlayers_tips

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
tecnica:gps_cartografia_gis:openlayers_tips [2011/09/22 16:25] – [Click destro] niccolotecnica:gps_cartografia_gis:openlayers_tips [2012/06/21 11:06] – [OpenLayers, ricette e trucchi] niccolo
Line 6: Line 6:
   * [[http://trac.osgeo.org/openlayers/wiki/Documentation|More documentation]]   * [[http://trac.osgeo.org/openlayers/wiki/Documentation|More documentation]]
   * [[http://openlayers.org/dev/examples/|Examples gallery]]   * [[http://openlayers.org/dev/examples/|Examples gallery]]
 +  * [[http://ole.geops.de/|OpenLayers Editor]] extend OpenLayers functionality
 ===== Layer supportati da OpenLayers ===== ===== Layer supportati da OpenLayers =====
  
Line 329: Line 329:
 ===== Problema con Layer.Markers e pop-up ===== ===== Problema con Layer.Markers e pop-up =====
  
-Se si disegna un layer di tipo **''OpenLayers.Layer.Markers()''** che contiene delle **''OpenLayers.Feature()''** il relativo attributo **''popupClass''**, bisogna fare in modo che questi layer vengano aggiunti alla mappa per ultimi, altrimenti si rischia che un altro layer (es. un **''OpenLayers.Layer.Vector()''**) aggiunto sopra intercetti il clik e impedisca la comparsa del popup.+Se si disegna un layer di tipo **''OpenLayers.Layer.Markers()''** che contiene delle **''OpenLayers.Feature()''** con il relativo attributo **''popupClass''**, bisogna fare in modo che questi layer siano aggiunti alla mappa per ultimi, altrimenti si rischia che un altro layer (es. un **''OpenLayers.Layer.Vector()''**) aggiunto sopra intercetti il clik e impedisca la comparsa del popup
 + 
 +È possibile anche usare il metodo **''raiseLayer()''** per abbassare di livello un layer, in modo che venga messo in fondo e non intercetti il clik che fa apparire il popup: 
 + 
 +<code javascript> 
 +map.addLayer(vectorLayer); 
 +map.raiseLayer(vectorLayer, 2 - map.getNumLayers()); 
 +</code> 
 + 
 +Si decrementa di 2 per tenere in conto il layer stesso e un solo baselayer, di 3 se i baselayer sono due, ecc.
tecnica/gps_cartografia_gis/openlayers_tips.txt · Last modified: 2013/03/18 16:25 by niccolo