[Talk-it] openlayers help

Luca Delucchi lucadeluge at gmail.com
Thu Jul 8 07:45:44 BST 2010


Il 08 luglio 2010 07.35, Stefano Salvador <stefano.salvador at gmail.com>
ha scritto:
>>     var pippo.kml = new OpenLayers.Layer.GML("pippo.kml GML","pippo.kml.gml");
>>     map.addLayer(pippo.kml);
>
> non capisco perché trasformare il KML in GML, openlayers legge
> tranquillamente il KML, oltretutto il GML è un po' più rognoso: se non
> compili il file XSD correttamente non va.
>
> se hai il file pippo.kml già pronto cambia le due righe di cui sopra con:
>
> var pippo = new OpenLayers.Layer.GML("KML", "pippo.kml",
>              {
>                format: OpenLayers.Format.KML,
>                formatOptions: {
>                  extractStyles: true,
>                  extractAttributes: true,
>                  maxDepth: 2
>               }
>             }));
> map.addLayer(pippo);
>

+1

>
> Ciao,
>
> Stefano
>

ciao
Luca




More information about the Talk-it mailing list