[OpenLayers-Users] Error in markers location on zooming

Christopher Schmidt crschmidt at metacarta.com
Wed Jun 6 07:50:47 EDT 2007


On Wed, Jun 06, 2007 at 09:47:30AM +0200, david delannoy wrote:
> Just to say that the problem is solved; It was a bug corrected in the 
> 2.4 release and evoked for the first time in the "Turning on/off layers 
> depending on zoom level 
> <http://openlayers.org/pipermail/users/2007-April/001440.html>" object 
> mail from the user mailing list. However I'm a bit surprised not to have 
> answers on this list; that is the second time that it happens. Is it 
> cause I don't explain clearly the problem or cause the solution is too 
> obvious? 

In order to determine which emails I respond to, I take the highly
scientific method of generating a random number between 1 and 10. If
it's less than 5, I think for a minute, if it's greater than or equal to
5, I think for a minute, and in either case, I then completely ignore
the number generated and reply based on whether I feel like it or not.  

Sometimes Open Source means you need to open the source. At the moment,
nobody gets paid to support OpenLayers users (or if they are, they're
not telling me about it), and even if there was such a role, it would
likely be limited in scope. Expecting a response in the 1-2 days
timeframe is simply not realistic -- but there's always the oppourtunity
to hire someone to investigate the problem for you, because the code is
there.

In this case, you were seeing the result of a marker icon not having
calculateOffset set, adn not having a correct offset. Prior to 2.4, the
correct offset was not enough, but we fixed that. There is probably
insufficient documentation on this problem. However, there is
insufficient documentation on about 75% of OpenLayers, and this isn't my
highest personal documentation priority.

> My last email was about changing marker icon on mouseover 
> event; If you have a solution, I would apreciate it.

Investigate events, and look at the internals of markers and icons for
where the image attribute is stored. There is no API to do what you're
looking for, but it is possible.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list