[OpenLayers-Users] Turning on/off layers depending on zoom level

Erik Uzureau erik.uzureau at metacarta.com
Tue Apr 10 18:45:54 EDT 2007


Thanks for sending the link. Unfortunately, I still can't quite see
what the problem is.
The resolution set in the link you sent is 0.02, not 0.2
I changed it to 0.03 and it seemed to not change much either.

Maybe if you can be more descriptive of the problem we can better track it down.

--Erik

On 4/10/07, kaka <drspencer at hotmail.com> wrote:
>
> This is an example of the problem I have:
>
> http://www.villageografica.com/test44/Africa-test.html
>
> If I change the maxResolution to 0.2 the map works fine, but its current 0.3
> won´t work. I hope this illustrates my problem.
>
> Magnus
>
>
>
> Erik Uzureau-3 wrote:
> >
> > Dear Kaka,
> >
> > Do you have a live example that you could post a link to?
> > Offhand, I can't see what the problem is... but I might be
> > able to help you out if I could see it in action
> >
> > Erik,
> > Best
> >
> > On 4/10/07, kaka <drspencer at hotmail.com> wrote:
> >>
> >> Thank you very much, Erik, this has been a great help. However, I have
> >> run
> >> into a problem. If the markers are set to not show on first load, but to
> >> appear when zooming in, the show/hide functionality stops working and the
> >> markers are dislocated when zooming out. My code looks like this:
> >>
> >> var MarkersLayer2 = new OpenLayers.Layer.Text( "Region info", {location:
> >> "markers.txt", maxResolution: 0.03});
> >>
> >> Changing the "0.3" to "0.2" causes the problems mentioned above. Is this
> >> related to my code or a possible bug?
> >>
> >> Magnus
> >>
> >>
> >>
> >>
> >> kaka wrote:
> >> >
> >> > Hi
> >> > I am trying to turn on/off a layer of markers depending on zoom level,
> >> > using google maps as a background layer. Does anyone have suggestions
> >> on
> >> > how to achieve this or is there or maybe an example? Thank you for any
> >> > ideas.
> >> >
> >> > Regards,
> >> >
> >> > Magnus
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Turning-on-off-layers-depending-on-zoom-level-tf3550126.html#a9927966
> >> 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
> > http://openlayers.org/mailman/listinfo/users
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Turning-on-off-layers-depending-on-zoom-level-tf3550126.html#a9929477
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



More information about the Users mailing list