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 '19, 15:15

Aaalexxx's gravatar image

accept rate: 0%

edited 24 Jan '19, 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 '19, 06:47

escada's gravatar image

accept rate: 20%

Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 24 Jan '19, 15:15

question was seen: 1,201 times

last updated: 25 Jan '19, 06:47

powered by OSQA