[OpenLayers-Users] Kml problems 2

Vidal, Antoni antoni.vidal at icc.cat
Wed Sep 30 07:59:00 EDT 2009


Hello,

I've deleted one of two features from every <Placemark>, but new kml doesn't work.

Maybe is a bug of KML.js?

Thank's.


Antoni Vidal
Unitat d'Aplicacions SIG-WEB
Institut Cartogràfic de Catalunya
Parc de Montjuïc, E-08038 Barcelona
Tel. (+34) 93 567 15 00 (ext. 3228)
www.icc.cat
 



Message: 3
Date: Wed, 30 Sep 2009 21:03:08 +0930
From: Duncan Sayers <duncansayers at threefivesouth.net>
Subject: Re: [OpenLayers-Users] Kml problems 2
To: OpenLayers Users <users at openlayers.org>
Message-ID: <D8674DDD-D18D-42E0-BB24-B1B54209EE1B at threefivesouth.net>
Content-Type: text/plain; charset=windows-1252; format=flowed;
	delsp=yes

In lib/OpenLayers/Format/KML.js there is a comment in the method  
parseFeature that says:

// only accept one geometry per feature - look for highest "order"

I wonder if this "one geometry per feature" bit is holding you up.

On 30/09/2009, at 7:51 PM, Vidal, Antoni wrote:

> Hello list,
>
> I have a kml file with two Placemark with a point and a polygon each  
> one, but only the last is showed over the map.
>
> <?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://earth.google.com/kml/2.0 
> ">
>    <Document>
>     <name>ICC - Fulls 1:25.000</name>
>                 <Folder id="layer 0">
>                                <name>Tall 1:25.000</name>
>       <Placemark>
>          <name><![CDATA[67-23]]></name>
>          <MultiGeometry>
>             <Point>
>                <coordinates>1.2292789482351385,42.12505809906476</ 
> coordinates>
>             </Point>
>             <Polygon>
>                <outerBoundaryIs>
>                   <LinearRing>
>                      <coordinates decimal="." cs="," ts="  
> ">1.31261326,42.16672373 1.14594315,42.16672487  
> 1.14594468,42.08339244 1.31261474,42.08339135  
> 1.31261326,42.16672373</coordinates>
>                   </LinearRing>
>                </outerBoundaryIs>
>             </Polygon>
>             </MultiGeometry>
>       </Placemark>
>
>       <Placemark>
>          <name><![CDATA[68-19]]></name>
>          <MultiGeometry>
>             <Point>
>                <coordinates>1.3959550858972396,42.458391895861894</ 
> coordinates>
>             </Point>
>             <Polygon>
>                <outerBoundaryIs>
>                   <LinearRing>
>                      <coordinates decimal="." cs="," ts="  
> ">1.47929122,42.50006088 1.31261965,42.5000564 1.31261912,42.4167232  
> 1.47928988,42.41672697 1.47929122,42.50006088</coordinates>
>                   </LinearRing>
>                </outerBoundaryIs>
>             </Polygon>
>             </MultiGeometry>
>       </Placemark>
>                 </Folder>
>    </Document>
> </kml>
>
> Any idea why the first Placemark isn?t rendered over the map?
>
> Thank?s.
>
> Antoni Vidal
> Unitat d'Aplicacions SIG-WEB
> Institut Cartogr?fic de Catalunya
> Parc de Montju?c, E-08038 Barcelona
> Tel. (+34) 93 567 15 00 (ext. 3228)
> www.icc.cat
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users



------------------------------

Message: 4
Date: Wed, 30 Sep 2009 13:43:22 +0200
From: "Rahn Hanno (rahn)" <rahn at zhaw.ch>
Subject: [OpenLayers-Users] TileCache and Openlayers
To: <users at openlayers.org>
Message-ID:
	<3F643797A078EB4FB0288008096809840186943B at langouste.zhaw.ch>
Content-Type: text/plain; charset="iso-8859-1"

I will realise the Tilecache but it doesn't work with my base layer. For all other layers it works.

 

Hello list,

 

I have another question and perhaps somebody can help me. I try to use Tilecache for a better performance of my maps.

I try to realise it, but in this time it will only work for my background layers. For my base Layer it doesn^t work. 

 

For my base layer (only polygons, "gemeinden_2008") I write the follwing code in the tilecache.cfg.

 

[gemeinden_2008]

type=WMS

url=http://webgis.hsw.ch/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map

mapfile=C:/ms4w/Apache/htdocs/GINES/Maps/Gemeinden_Bern.map

layers=gemeinden_2008

extension=png

extent_type=loose

srs=EPSG:21781

bbox=555100,129900,678450,245000

metaTile=true

 

And in my OpenLayers File I define the layer like this:

 

var layerName = (jahr <=2008) ? 'gemeinden_2008' : 'gemeinden_2009';

var urlArrayTC = ["http://webgis.hsw.ch/cgi-bin/tilecache/tilecache.cgi?"];

var mapFile = "../htdocs/GINES/Maps/Gemeinden_Bern.map";

 

var options1 = {

                        maxExtent: new OpenLayers.Bounds(555100,129900,678450,245000),

                        maxScale: '500',

                        minScale: '458262',

                        //                      fractionalZoom: true,

                        resolutions:[481.8359375, 240.91796875, 120.458984375, 60.2294921875, 30.11474609375, 15.057373046875, 7.5286865234375, 3.76434326171875, 1.882171630859375, 0.9410858154296875, 0.47054290771484375, 0.23527145385742188, 0.11763572692871094, 0.058817863464355469, 0.029408931732177734, 0.014704465866088867, 0.0073522329330444336, 0.0036761164665222168, 0.0018380582332611084, 0.0009190291166305542],

                        //                      tileSize: new OpenLayers.Size(500,500),

                        units: 'm',

                        projection: "EPSG:21781",

                        controls: []

                        };

 

var map = new OpenLayers.Map('map',options1);

 

var wms = new OpenLayers.Layer.WMS("Gemeinden",urlArrayTC, {map:mapFile,layers:layerName,format:"image/png",EXCEPTIONS:"application/vnd.ogc.se_inimage"} );

 

var sld_string=url+"jahr="+jahr+"&indikator="+indikator1+"&klassen="+klassen+"&vis="+vis+"&fusion="+jahr4+"&farbe="+farbe;

 

wms.mergeNewParams({ SLD:sld_string});

 

I only get a white map without any polygons. Perhaps you can give me a little tip. I don't know Why I have no map data.

 

A lot of thanks 

Hanno Rahn

 

 

------------------------------------------

Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik

ZHAW Z?rcher Hochschule f?r Angewandte Wissenschaften Umwelt und Nat?rliche Ressourcen 

Fachstelle Geoinformatik 

Gr?ental, Postfach CH-8820 W?denswil 

Tel +41 (0)58 934 5592

Fax +41 (0)58 934 5580 

hanno.rahn at zhaw.ch 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openlayers.org/pipermail/users/attachments/20090930/dca0fbf1/attachment.htm 

------------------------------

_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users


End of Users Digest, Vol 36, Issue 105
**************************************



More information about the Users mailing list