[OpenLayers-Users] Not change the size o polygons with zoom change

Jose A. C. joscalv at gmail.com
Fri Aug 1 02:39:54 EDT 2008


Hi!!



I'm making a map, and I need to create polygons on it that don´t change its
size when the zoom of the map change. I don´t use a mark because I need to
rotate it.



Has someone any idea about how I can do it?



I have another problem:  I draw different layers with different units and
when it is draw the size of the figure is the same in spite of  having
different measures unit (Km and inches). The code is:



vectorLayer = new OpenLayers.Layer.Vector("Simple Geometry", {style:
layer_style});

            vectorLayer.units="mi";

            map.addLayer(vectorLayer);



            vectorLayer2 = new OpenLayers.Layer.Vector("Simple Geometry 2",
{style: layer_style});

            vectorLayer2.units="km";

            map.addLayer(vectorLayer2);



var poligonoTriangulo = OpenLayers.Geometry.Polygon.createRegularPolygon(new
OpenLayers.Geometry.Point(-20,40),5,3,0);

var triangulo = new OpenLayers.Feature.Vector(poligonoTriangulo,null,
style_triangulo);

vectorLayer.addFeatures(triangulo);



var poligonoTriangulo2 = OpenLayers.Geometry.Polygon.createRegularPolygon(
new OpenLayers.Geometry.Point(-0,40),5,3,0);

var triangulo2 = new OpenLayers.Feature.Vector(poligonoTriangulo2,null,
style_triangulo);

vectorLayer2.addFeatures(triangulo2);



The units are km and mi, but the size of the figures on the map is the same.





Thanks!!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080801/12bb91da/attachment.html


More information about the Users mailing list