<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=718101518-10102008><FONT face=Arial
color=#0000ff size=2>The resolution is units per pixel. if you want a point with
a radius of 20km = 20000m, then you can calculate the radius in pixel = 20000 /
actual resolution.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=718101518-10102008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=718101518-10102008><FONT face=Arial
color=#0000ff size=2>Instead of a point feature, you can also take a regular
polygon with ie. 20 sides to get a circle. Then the radius have to be in units
of the map and as it is a geometric object, it changes the size with zoom.
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=718101518-10102008><FONT face=Arial
color=#0000ff size=2><BR>Arnd Wippermann</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=718101518-10102008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Von:</B> users-bounces@openlayers.org
[mailto:users-bounces@openlayers.org] <B>Im Auftrag von </B>Chris
Streeter<BR><B>Gesendet:</B> Freitag, 10. Oktober 2008 19:09<BR><B>An:</B>
users@openlayers.org<BR><B>Betreff:</B> Re: [OpenLayers-Users] Dynamically Sized
Points With Styles<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr>As a followup to this question, I'm trying to wrap my head around
how to translate actual distances to what is shown on the map. For
example, if I wanted to create a feature with a radius of 20 kilometers, how do
I specify the radius for the feature based on the map's resolution and
scale. I'm not quite clear on how feature radii relate to map resolution
and scale.<BR><BR>Thanks,<BR><BR>- Chris<BR><BR>
<DIV class=gmail_quote>On Wed, Oct 8, 2008 at 11:49, Arnd Wippermann <SPAN
dir=ltr><<A
href="mailto:arnd.wippermann@web.de">arnd.wippermann@web.de</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><A
href="http://n2.nabble.com/GML%2C-Point-and-Change-the-Size-of-the-Circle...-tc791275.html#a791275"
target=_blank>http://n2.nabble.com/GML%2C-Point-and-Change-the-Size-of-the-Circle...-tc791275.html#a791275</A></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT><FONT face=Arial
color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN><FONT face=Arial color=#0000ff size=2>listen to the zoom event and
redraw the feature with the new styleMap, where the pointRadius is a function
of the zoom level:</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Arial color=#0000ff size=2>new
OpenLayers.StyleMap({<BR> "default":
OpenLayers.Util.applyDefaults({<BR>
pointRadius: faktor*map.getZoom()<BR> },
OpenLayers.Feature.Vector.style["default"]<BR>});<BR></FONT></SPAN></DIV><FONT
color=#888888>
<DIV><SPAN></SPAN><FONT face=Arial><FONT color=#0000ff><FONT size=2>A<SPAN>rnd
Wippermann</SPAN></FONT></FONT></FONT><BR></DIV>
<DIV lang=de dir=ltr align=left>
<HR>
<FONT face=Tahoma size=2><B>Von:</B> <A
href="mailto:users-bounces@openlayers.org"
target=_blank>users-bounces@openlayers.org</A> [mailto:<A
href="mailto:users-bounces@openlayers.org"
target=_blank>users-bounces@openlayers.org</A>] <B>Im Auftrag von </B>Chris
Streeter<BR><B>Gesendet:</B> Mittwoch, 8. Oktober 2008 07:04<BR><B>An:</B> <A
href="mailto:users@openlayers.org"
target=_blank>users@openlayers.org</A><BR><B>Betreff:</B> [OpenLayers-Users]
Dynamically Sized Points With Styles<BR></FONT><BR></DIV></FONT>
<DIV>
<DIV></DIV>
<DIV class=Wj3C7c>
<DIV></DIV>
<DIV dir=ltr>I was wondering if it is possible to dynamically resize a point
based on the zoom level of the map.<BR><BR>With the example at <A
href="http://www.openlayers.org/dev/examples/styles-unique.html"
target=_blank>http://www.openlayers.org/dev/examples/styles-unique.html</A>,
can we make the points change their radius as we zoom in? I'd like to
keep the circles the same relative size to the underlying map
layer.<BR><BR>Thanks,<BR><BR>-
Chris<BR></DIV></DIV></DIV></DIV></BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>