umap icon indicating copy to clipboard operation
umap copied to clipboard

Add another type of data layer : proportional circles

Open naomap opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. The addition of cloropleth data layers triggers another idea : showing point data as proportional circles, i.e. circles whose area is proportional to the value of a numerical field.

Describe the solution you'd like

  • Load point data in a layer, with a field that contains a numerical value e.g. population.
  • Select "Proportional circles" as the type of layer
  • Define the field used to calculate the area of each circle, and a factor to apply so that circle sizes can be adjusted
  • Each point is displayed as a circle, and can be selected to show a popup.
  • It may be necessary to adjust the size of circles to the zoom level, so that they do not hide each other at a low zoom level => need for another factor ?

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Example map : image

naomap avatar Nov 09 '23 15:11 naomap

Here is an example with Overpass Turbo : bicycle parkings where the surface is proportional to their capacity http://overpass-turbo.eu/s/1DS5

Another example with the population of cities, where a factor is required to let the circles have a sensible size : http://overpass-turbo.eu/s/1DSp. Note the sqrt() which is needed for most (all ?) types of values, so that the surface of the circle (rather than the diameter) is proportional to the value.

naomap avatar Nov 24 '23 09:11 naomap

May help https://github.com/balladaniel/leaflet-dataclassification

yohanboniface avatar Jun 29 '24 08:06 yohanboniface