Hi Arnd,

Just what I needed. Danke Arnd. Now is all OK.

Thanks
Hareck


----- Original Message ----- From: "Arnd Wippermann" <[email protected]>
To: "'Hareck'" <[email protected]>
Cc: <[email protected]>
Sent: Tuesday, December 07, 2010 7:41 PM
Subject: AW: [OpenLayers-Users] zoom problem with gpx vector layers


Hi,

Instead of creating the layer object in your iframe, i would move the
function
newOverlayLayer(route, url); to gmap-vector.js.
and call it from the iframe
top.frames.newOverlayLayer('Route 3', 'tour3.gpx');

This way you don't have to use objects as parameters, but strings. Perhaps
it solves your problem.

Arnd




________________________________

Von: [email protected]
[mailto:[email protected]] Im Auftrag von Hareck
Gesendet: Dienstag, 7. Dezember 2010 10:38
An: Hareck
Cc: [email protected]
Betreff: Re: [OpenLayers-Users] zoom problem with gpx vector layers


Hi,

Nobody with an idea what could be wrong?

The gpx layer from the iframe is added to the map and shown in the map
correctly.
But if zoom changed or layer is switched on/off in the layerSwitcher  the
layer is drawn in correct scale but old layer (from the view before) is not
deleted, with the result that multiple layer are shown.

Here is a HTML extract made by Firebug:

<g id="OpenLayers.Layer.Vector_8_vroot">

<polyline id="OpenLayers.Geometry.LineString_962" points="527.92,293.395
528.058,293.438 . 528.317,293.346 527.901,293.381" fill="none" stroke="blue"
stroke-opacity="0.5" stroke-width="4" stroke-linecap="round"
stroke-linejoin="round"/>

<polyline id="OpenLayers.Geometry.LineString_962" points="527.92,293.395
528.058,293.438 . 528.317,293.346 527.901,293.381" fill="none" stroke="blue"
stroke-opacity="0.5" stroke-width="4" stroke-linecap="round"
stroke-linejoin="round"/>

<polyline id="OpenLayers.Geometry.LineString_962" points="519.96,274.697
520.029,274.719 . 520.158,274.673 519.95,274.691" fill="none" stroke="blue"
stroke-opacity="0.5" stroke-width="4" stroke-linecap="round"
stroke-linejoin="round"/></g>

What's happening here :
1. The gpx layer is set from iframe to map and layerSwitcher.
<g id="OpenLayers.Layer.Vector_8_vroot"> is empty.

2. Switch on layer in layerSwitcher
<g id="OpenLayers.Layer.Vector_8_vroot"> first LineString is added. Layer is
shown in map.

3. Switch off/on layer in layerSwitcher
<g id="OpenLayers.Layer.Vector_8_vroot"> second LineString with the same
points is added. Layer is shown in map. The line color gets more blue.

4. After map zoom
<g id="OpenLayers.Layer.Vector_8_vroot"> third LineString with new
calculated points is added. Layer is shown in map correctly. This is the
third shown layer.



Example is here:

http://www.hareck.lima-city.de/OL/testol-wms-if-vector.html

Thank you for any advice.

Hareck

----- Original Message -----
From: Hareck <mailto:[email protected]>
To: OpenLayers, users list <mailto:[email protected]>

Sent: Wednesday, December 01, 2010 5:08 PM
Subject: [OpenLayers-Users] zoom problem with gpx vector layers

Hi all,

I have a zoom problem with gpx vector layers which are set from an
iframe.

I use two windows, a main window with a wms-map and 2 gpx vector
layers (route 1, 2) and an iframe where I can set an additional gpx vector
layer (route 3, 4 or 5) in the wms-map. All layers will be shown correctly.
But if I change the scale (zoom) the layer from the iframe is shown
multiple, in the current scale and in the last scale(s).

I have no explanation for this behavior.



Best Regards

Hareck

________________________________

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users





_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to