Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I want to draw circles of certain radius on a map using openlayers . But the latitude,longitude & radius values are given in a excel sheet. I badly need a help from you people to how to carry in this work in openlayers. I heard that openlayers doesn't take data from excel sheet. so to which format I have to change my excel file? And how to draw circles on the map? It will be greatful if you can provide me the code(atleast sample code)

share|improve this question

2 Answers 2

up vote 7 down vote accepted

Circles in Openlayers

http://geographika.co.uk/samples/geodesic/

http://geographika.co.uk/creating-a-geodesic-circle-in-openlayers you will need your data in json - Google Spreadsheets can do this

http://spreadsheets.google.com/feeds/feed/key/worksheet/public/basic?alt=json-in-script&callback=myFunc

http://code.google.com/apis/gdata/samples/spreadsheet_sample.html

share|improve this answer
2  
It's perhaps a bit too complicated to draw geodetic polygons. Here is a demo using MapFish client (so OpenLayers) : demo.mapfish.org/mapfishsample/1.2/examples/geostat/… –  Laurent Jégou Jan 28 '11 at 8:15
    
You can find a basic OpenLayers text layer example here: dev.openlayers.org/releases/OpenLayers-2.10/examples/… It is based on this simple text file: dev.openlayers.org/releases/OpenLayers-2.10/examples/… –  DavidF Jan 28 '11 at 14:20

Hi it has a built in function called createRegularPolygon that can be used like this:

var circle = OpenLayers.Geometry.Polygon.createRegularPolygon(
    new OpenLayers.Geometry.Point(0, 0),
    1,
    30
);
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.