tecnica:gps_cartografia_gis:openlayers_tips
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tecnica:gps_cartografia_gis:openlayers_tips [2011/07/19 18:32] – [Click destro] niccolo | tecnica:gps_cartografia_gis:openlayers_tips [2013/03/18 16:25] (current) – [Layer supportati da OpenLayers] niccolo | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| * [[http:// | * [[http:// | ||
| * [[http:// | * [[http:// | ||
| + | * [[http:// | ||
| ===== Layer supportati da OpenLayers ===== | ===== Layer supportati da OpenLayers ===== | ||
| Line 12: | Line 12: | ||
| ^ Markers | ^ Markers | ||
| ^ Text | Del tutto simile al '' | ^ Text | Del tutto simile al '' | ||
| - | ^ GeoRSS | + | ^ GeoRSS |
| - | ^ Vector | + | ^ Vector |
| ^ KML | Layer vettoriale. Supporta diverse strategie di caricamento, | ^ KML | Layer vettoriale. Supporta diverse strategie di caricamento, | ||
| ^ WFS | | | ^ WFS | | | ||
| Line 235: | Line 235: | ||
| il **rettangolo che evidenzia l' | il **rettangolo che evidenzia l' | ||
| - | ===== Sistemi di riferimento ===== | + | ===== Sistemi di riferimento |
| OpenLayers supporta alcuni sistemi di riferimento, | OpenLayers supporta alcuni sistemi di riferimento, | ||
| Line 246: | Line 246: | ||
| <code html> | <code html> | ||
| <script type=" | <script type=" | ||
| + | <script type=" | ||
| + | <script type=" | ||
| <script type=" | <script type=" | ||
| </ | </ | ||
| - | In teoria OpenLayers dovrebbe scoprire automaticamente che è disponibile la libreria proj4js, ma non è chiaro come. | + | In teoria OpenLayers dovrebbe scoprire automaticamente che è disponibile la libreria proj4js, |
| - | Sistemi di riferimento aggiuntivi | + | Sistemi di riferimento aggiuntivi |
| + | |||
| + | Ecco ad esempio il file **'' | ||
| <code javascript> | <code javascript> | ||
| Line 259: | Line 263: | ||
| </ | </ | ||
| - | Se non si aggiunge manualmente la definizione, proj4js tenta di scaricarla da spatialreference.org. L' | + | Dopo aver incluso il JavaScript di cui sopra, diventa possibile fare operazioni del tipo: |
| + | |||
| + | <code javascript> | ||
| + | var lonLat = new OpenLayers.LonLat(1554000, | ||
| + | alert(" | ||
| + | lonLat.transform(new OpenLayers.Projection(' | ||
| + | alert(" | ||
| + | </ | ||
| + | |||
| + | :!: **ATTENZIONE!** | ||
| ===== i18n ===== | ===== i18n ===== | ||
| Line 306: | Line 319: | ||
| alert(" | alert(" | ||
| OpenLayers.Event.stop(e); | OpenLayers.Event.stop(e); | ||
| - | return; | + | return |
| } | } | ||
| } | } | ||
| Line 314: | Line 327: | ||
| </ | </ | ||
| + | ===== Problema con Layer.Markers e pop-up ===== | ||
| + | |||
| + | Se si disegna un layer di tipo **'' | ||
| + | |||
| + | È possibile anche usare il metodo **'' | ||
| + | |||
| + | <code javascript> | ||
| + | map.addLayer(vectorLayer); | ||
| + | map.raiseLayer(vectorLayer, | ||
| + | </ | ||
| + | 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.1311093135.txt.gz · Last modified: by niccolo
