[OpenLayers-Users] Marker Disappearing

Erik Uzureau erik.uzureau at metacarta.com
Wed Jun 27 11:58:36 EDT 2007


On 6/27/07, Christopher Schmidt <crschmidt at metacarta.com> wrote:
> On Wed, Jun 27, 2007 at 09:44:59AM -0500, Lee Keel wrote:
> > Hello All,
> >
> >
> >
> > We are experiencing a disappearing marker when the user zooms in after
> > placement of the marker.  You can see this @
> > http://hud.uai.com/hudpls/ViewMap.aspx?FindAddTI=1 then by doing an address
> > search.  The marker will remain as long as you are at the current zoom level
> > or above, but disappears when you zoom in beyond the initial level.  Here is
> > the code I am using to create the marker.
>
> Change this:
>
> >    addressMarkers = new OpenLayers.Layer.Markers("Find Address");
>
> To this:
>
> addressMarkers = new OpenLayers.Layer.Markers("Find Address",
> {'calculateInRange': function() { return true; }});
>
> Alternatively, I think the following should work:
>
> addressMarkers = new OpenLayers.Layer.Markers("Find Address",
> {'numZoomLevels':25});
>
> But I'm not 100% sure.
>
> The problem is that your markers layer is considered 'out of range' for
> some reason -- changing the numZoomLevels should fix that, but
> overrdiding the calculateInRange function to always return true should
> also work.
>
> The source of the problem here is probably related to the 'resolutions'
> setting on your base_wms.
>
> Erik, is this the behavior you expected? I think your'e closest to this
> code -- to reproduce it, simply create a map with an explicit list of
> resolutions which reaches farther in than the default, and then watch
> your markers layer turn off when you zoom in past that point.

Thanks for picking up on this, chris. I will add this to my queue for
next week and do a real investigation at that point. :-)
Erik

>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



More information about the Users mailing list