[Talk-it] slippymap con tracce gpx su un sito web
niubii
f.pelullo a gmail.com
Lun 28 Nov 2011 07:16:04 GMT
2011/11/28 Gianmario Mengozzi <gianmario.mengozzi at gmail.com>
> sto cercando di inserire una slippymap sul mio blog , contenente una o più
> tracce (gpx)
>
> ho letto l'esempio delle openlayers su
> http://wiki.openstreetmap.org/wiki/IT:Openlayers_Track_example , ma non
> riesco a capire cosa intenda quando dice che il file .gpx deve essere
> caricato sul webserver (?) (...Place the gpx file(s) into a folder on
> the webserver... / ... xxx*.gpx* is the path to your GPX file *on the
> server*. NB you cannot call for a file from another domain )
>
>
devi salvare il file .gpx in una directory della macchina su cui è ospitato
il blog.
In pratica è un file locale.
Poi lo richiami nell'html con il percorso relativo:
var lgpx = new OpenLayers.Layer.GML("*nome traccia*", "./*directory_locale/
nometraccia.gpx*", {
format: OpenLayers.Format.GPX,
style: {strokeColor: "green", strokeWidth: 5, strokeOpacity: 0.5},
projection: new OpenLayers.Projection("EPSG:4326")
Se la traccia la salvi nella home del blog allora puoi utilizzare la
sintassi indicata sul wiki.
>
>
> dove sbaglio?
>
>
>
non è il database delle tracce. :-)
Ciao
/niubii/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-it/attachments/20111128/f1f1fc7f/attachment.html>
Maggiori informazioni sulla lista
Talk-it