AW: [OpenLayers-Users] Re: Circles
Arnd Wippermann
arnd.wippermann at web.de
Tue Feb 22 16:31:59 EST 2011
Oops,
I wasn't aware of the change. I worked with an old patched copy from OL 2.7.
The documentation is also not uptodate.
http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/Text-js.html
Arnd
-----Ursprüngliche Nachricht-----
Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Christian
Mayer
Gesendet: Montag, 21. Februar 2011 16:13
An: openlayers-users at lists.osgeo.org
Betreff: Re: [OpenLayers-Users] Re: Circles
Hello,
if you are using the OpenLayers.Format.Text format (not sure what you mean
"by giving lat long values in text file" ) you can also define user
specified attributes. Just add them into your text file and give them a
unique column name (tab separated):
point title description icon radius
10,20 my title my description 5
With this your radius is available like this:
feature.attributes.radius
Best regards,
Chris
Am 19.02.2011 15:21, schrieb Arnd Wippermann:
> 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.h
> tml 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
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
More information about the Users
mailing list