AW: [OpenLayers-Users] Re: Circles
Arnd Wippermann
arnd.wippermann at web.de
Sat Feb 19 09:21:42 EST 2011
You have to use KML or GML to get features with an attribute "radius".
Add your layer and register the event "loadend" to create your buffer
layerGML.events.register("loadend", layerGML, something);
function something()
{
var pointFts = this.features;
var sides = 25;
var fts = [];
for(var i=0;i<pointFts.length;i++)
{
var radius = pointFts[i].attributes["radius"]*10;
var cPt = pointFts[i].geometry;
var theGeom = new
OpenLayers.Geometry.Polygon.createRegularPolygon(cPt, radius, sides, 0);
var ft = new OpenLayers.Feature.Vector();
ft.geometry = theGeom;
fts.push(ft);
}
this.addFeatures(fts);
}
Arnd
-----Ursprüngliche Nachricht-----
Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Vikash
Talanki
Gesendet: Freitag, 18. Februar 2011 17:29
An: users at openlayers.org
Betreff: [OpenLayers-Users] Re: Circles
Hi everyone,
I want to create an application in which input values of lat,long,radius are
given and I have to point the markers (of lat-long values) and create
buffers(of corresponding radius) around them. However I am able to create
markers on the map by giving lat long values in text file, but I am really
stuck when I want to create buffers around them, and I dont know how to give
radius values in text file. Please help me out in this issue, If text file
is not correct then which file file format I have to use(like KML,etc) and
how to carry on this work
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/dynamic-url-tp1832057p6040574.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
More information about the Users
mailing list