NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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

Aaalexxx
16113
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

escada
19.0k16166302
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:

×26
×17

question asked: 24 Jan '19, 15:15

question was seen: 2,744 times

last updated: 25 Jan '19, 06:47

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum