autogestion / corruption_tracker

BSD 3-Clause "New" or "Revised" License
11 stars 11 forks source link

Polygon vs Organization issue #35

Open autogestion opened 9 years ago

autogestion commented 9 years ago

@Dovbo offered concept named "centroids", which implies polygon-based organizations, which could be shown in pop-up by clicking on polygon. Organization's claims aggregated number will be shown inside element in center of polygon, with coordinates set in initial geojson in properties of polygon. This concept looks fine, especially in cases, when building have dozens of organizations (like Derzhprom), but creates a bottle neck, so that we can't proceed before polygons are drawn.

Another way, is to use polygon as decoration, and organization as independent entity. Organization would have its own coordinates and would be settled on map as point. It could be linked to polygon or layer, to have ability to be shown when user clicks on district and zoom in some area. In this case to play with organizations we would have just to set some points on the map, and after polygons would be ready, place them as backing.

Also, we could implement both concepts, by creating subclass of Organization, with coordinates. If organizations related to polygon are instances of base class, polygon will agregate their claims number, and will show it using centroid coordinates. Оtherwise, polygon do nothing, just is located on map, and claims is shown on organizations points.