[OpenLayers-Users] vector feature style.
Christopher Schmidt
crschmidt at metacarta.com
Fri Oct 5 09:06:56 EDT 2007
On Fri, Oct 05, 2007 at 11:51:26AM +0200, Eric Lemoine wrote:
> On 10/5/07, Prasad Choudhary <prasad.choudhary at gmail.com> wrote:
> >
> > Hello all,
>
> Hi Prasad,
>
> >
> > I have some drawing on map what should I choose OpenLayers.Layer.Vector() or
> > OpenLayers.Layer.Canvas()
>
> What version of OpenLayers are you using? The Canvas layer is a bit
> old, so you'd better use the Vector layer and possibly use a more
> recent version of OpenLayers.
>
> > and one more thing, If i'm drawing some road with some style then how could
> > I make the strokeWidth or point radius thin or thick on zoom level change.
>
> You can register a callback on zoomend. In the callback you change the
> layer style and ask for a layer redraw. I haven't tried this myself,
> but something along these lines should work.
In future versions of OpenLayers, we will support SLD-style rules for styling,
which will allow you to have OpenLayers redetermine the style on redraw.
(We're not there yet though.)
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list