[OpenLayers-Users] Markers incorrectly placed after pan
crschmidt at metacarta.com
Fri May 8 00:34:50 EDT 2009
On Fri, May 08, 2009 at 09:22:19AM +0800, Andrew Smith wrote:
> I'm an OL newbie so have no idea how to fix your problem, but thought I'd
> have a look to see what your map looked like. Ran into the following issues:
> - In Firefox 3.0.10 the Play button doesn't do anything at all.
> - In IE8 I get
> Webpage error: Line: 138 Error: 'console' is undefined
> Just thought you'd like to know.
Presumably you didn't turn on firebug on the site.
The problem is that Marker.moveTo is *not* an API function, and is only
intended to be used internally. It takes a LayerPx instead of a
ViewPortPx, so you'll need to do some conversion there.
I'd just use vectors intead of markers...
> On Thu, May 7, 2009 at 4:33 PM, gwales <gary_wales at hotmail.com> wrote:
> > I am working on a viewer for GPX data which is mostly operational.
> > When loaded, a marker is placed at the start of the vector representing the
> > GPX file.
> > I have included a 'play' button which advances the marker along the track.
> > All works well until the map is panned and then the marker is offset from
> > the track by the amount of the pan.
> > Zooming or changing the window size causes the marker to snap back into
> > place.
> > http://www.munromagic.com/dev/GPXMap.cfm?RouteLogID=134408
> > An ideas how to fix this?
> > --
> > View this message in context:
> > http://n2.nabble.com/Markers-incorrectly-placed-after-pan-tp2826723p2826723.html
> > Sent from the OpenLayers Users mailing list archive at Nabble.com.
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users
> Users mailing list
> Users at openlayers.org
More information about the Users