Il 08 luglio 2010 07.22, albertobonati <albertobon...@libero.it> ha scritto:
> Riepilogo quello che succede usando un file chiamato pippo.kml (esportato da
> Google Earth) con OGR2Layers su Qgis:
>

mi puoi passare in privato il file pippo.kml vorrei vederlo un attimo.
perchè è molto strano che non funzioni, l'unica cosa che avevo notato
con i kml è che davano abbastanza fastidio nelle riproiezioni perchè
sembra che supportino solo epsg:4326

> OGR2Layers crea i files:
> index.html
> pippo.kml.gml
> pippo.kml.xsd
>
> Index.html apre una pagina completamente bianca.
>

puoi debuggarla con firefox utilizzando l'addons firebug, ti dirà l'errore....

> il contenuto dei files è:
>
> index.html
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> <html xmlns="http://www.w3.org/1999/xhtml";>
> <head>
> <title>OGR2Layers</title>
> <style>
>  #map{width:400px;height:400px;}
> </style>
> <script src="http://www.openlayers.org/api/2.8/OpenLayers.js";></script>
> <script type="text/javascript">
> var map, selectsControls
> function init(){
>     var option = {
>         projection: new OpenLayers.Projection("EPSG:900913"),
>         displayProjection: new OpenLayers.Projection("EPSG:4326")
>     };
>     map = new OpenLayers.Map('map', option);
>     olmapnik = new OpenLayers.Layer.OSM("OpenStreetMap Mapnik",
> "http://tile.openstreetmap.org/${z}/${x}/${y}.png";);
>     map.addLayer(olmapnik);
>     map.setBaseLayer(olmapnik);
>     var pippo.kml = new OpenLayers.Layer.GML("pippo.kml
> GML","pippo.kml.gml");
>     map.addLayer(pippo.kml);
>     var ls= new OpenLayers.Control.LayerSwitcher();
>     map.addControl(ls);
>     ls.maximizeControl();
>     extent = new
> OpenLayers.Bounds(11.651145,44.276291,11.68136,44.30021).transform(new
> OpenLayers.Projection("EPSG:4326"), new
> OpenLayers.Projection("EPSG:900913"));
>     map.zoomToExtent(extent);
> };
> </script>
> </head>
> <body onload="init()">
> <h1></h1>
> <div id="map"></div>
> </body>
> </html>
>

la pagina è a posto

> pippo.kml.gml
> <?xml version="1.0" encoding="utf-8" ?>
> <ogr:FeatureCollection
>      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>      xsi:schemaLocation="http://ogr.maptools.org/ pippo.xsd"
>      xmlns:ogr="http://ogr.maptools.org/";
>      xmlns:gml="http://www.opengis.net/gml";>
>                                                                                                                                                                     &
> nbsp;
> </ogr:FeatureCollection>
>

se il gml è questo è completamente vuoto...devo fare delle prove con il kml

>
> Ciao
>
> Alberto
>

ciao
Luca

_______________________________________________
Talk-it mailing list
Talk-it@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk-it

Rispondere a