I am trying to create a circle with fixed radius programatically and am using 
OpenLayers.Geometry.Polygon.createRegularPolygon(center, radius, sides, angle) 
to do that.  

I have trouble converting my distance, say 800 feet, to the correct radius 
value in map units.  This is what I do:

 

var inches = OpenLayers.INCHES_PER_UNIT;

radius = radius * inches["ft"] / inches[map.getUnits()];

 

The circle drawn has smaller radius than what I wanted.  What's the right way 
of converting real distance to map units?  And by 'map units', does it mean the 
value returned by map.getUnits()?

 

Thanks for any help.

 

Cynthia
                                          
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to