Hello guys! I need to get list of cities in region.

  1. pick a point on a map
  2. enter the circle radius
  3. paint a circle around point with this radius
  4. get all cities in circle

Now I'm using OpenLayers and draw circle with RegularPolygon.

I think I need your advice how should I make it if it is possible.

Thanks in advance!

asked 24 Jan, 15:15

Aaalexxx's gravatar image

Aaalexxx
1613
accept rate: 0%

edited 24 Jan, 15:47


Sorry for being very brief, but you can use OverPass to query anything you want around a certain point with the around function

So in OpenLayers you have to convert the click to lat/lon, then construct an http-request to the Overpass API with around in the query, do the http-request, parse the result and show it somehow. I'm sure you can find examples of combining Overpass and OpenLayers.

permanent link

answered 25 Jan, 06:47

escada's gravatar image

escada
17.3k16143273
accept rate: 21%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×17
×8

question asked: 24 Jan, 15:15

question was seen: 269 times

last updated: 25 Jan, 06:47

powered by OSQA