[Gfoss] geojson openlayers.layer

Ciao

openlayers deve aver cambiato il codice e non accetta più certe stringhe
tra l'altro fatte anche tramite il plugin per Qgis
ovvero nel caricamento di file geojson
fino a venerdì questo html funzionava perfettamente
http://cicciogas.it/cartografia/bicicosi_1.html

un semplice
var percorso = new OpenLayers.Layer.GML("percorso", "percorso.GeoJSON",
{format: OpenLayers.Format.GeoJSON,style: {strokeColor: "red",
strokeWidth: 6, strokeOpacity: 0.5}});
non lo legge più

ho provato a cambiarlo in
var percorso = new OpenLayers.Layer.Vector('percorso',{
    protocol: new OpenLayers.Protocol.HTTP({
       url: 'percorso.GeoJSON',
       format: new OpenLayers.Format.GeoJSON({}),
style: {strokeColor: "red", strokeWidth: 6, strokeOpacity: 0.5}
});
ma niente ugualmente

qualcuno sa qualcosa?
(ho scritto sulla ml di openlayers users ma ad ora niente, anche se per
onor del vero il mio inglese è pessimo, e anzi dalla fretta mi è
scappato un copia e icnolla di un testo in italiano)

--
Enrico Gabrielli
messaggistica, audio e video (prot. xmpp): bonushenricus@jabber.org
http://cicciogas.it/wiki
Album fotografico di bonushenricus: http://www.flickr.com/photos/10688869@N03/show/
Linux count registered user #518831 - Gnu/Linux Debian 6.0

Il 04/07/2012 08:17, bonushenricus ha scritto:

var percorso = new OpenLayers.Layer.GML("percorso", "percorso.GeoJSON",
{format: OpenLayers.Format.GeoJSON,style: {strokeColor: "red",
strokeWidth: 6, strokeOpacity: 0.5}});
non lo legge più

Ciao,
nella 2.12 per usare OpenLayers.Layer.GML devi aggiungere deprecated.js nella build [1]

[1]: https://github.com/openlayers/openlayers/blob/master/notes/2.12.md

--
Luca Casagrande
http://www.lucacasagrande.net

Grazie Luca
anche se non ho capito dove sia il codice deprecated.js
Ho risolto, forse solo temporaneamente con

Nel caso volessi usare la 2.12 come dovrò caricare il geoJson?
Non ho fretta: mi guarderò i manuali nel caso, ma quest'autunno: intanto
c'ho messo una pezza e se funziona va bene così.

-----
Enrico Gabrielli
aka bonushenricus
http://cicciogas.it/wiki/EnricoGabrielli
--
View this message in context: http://gfoss-geographic-free-and-open-source-software-italian-mailing.3056002.n2.nabble.com/geojson-openlayers-layer-tp7578441p7578460.html
Sent from the Gfoss -- Geographic Free and Open Source Software - Italian mailing list mailing list archive at Nabble.com.

Il 04/07/2012 16:15, bonus-henricus ha scritto:

Nel caso volessi usare la 2.12 come dovrò caricare il geoJson?
Non ho fretta: mi guarderò i manuali nel caso, ma quest'autunno: intanto
c'ho messo una pezza e se funziona va bene così.

L'esempio per il GML [1] sul sito di OL è aggiornato alla 2.12.

Ciao
L.

[1]: http://dev.openlayers.org/releases/OpenLayers-2.12/examples/gml-layer.html

--
Luca Casagrande
http://www.lucacasagrande.net