Page 1 of 1

How to display/cover a map area by geo locations

Posted: Fri Dec 22, 2017 9:02 am
by Prakash
Hi,

I am using Ajax Map and need to show all given geo locations covered in an area as below:
Expected map view, it should cover area within given region/country
Expected map view, it should cover area within given region/country
For now we are using Polygons to cover area/region but can't achieve/meet my expected result. Covered area is crossing border of other countries, you could see it in below image:
Covered area are intersecting other countries
Covered area are intersecting other countries
I have few cases/issues:
1) It should work with large set of data/geo locations.
2) Any other ways to achieve above requirement.

Please let me suggest, how can I get my expected outcome.

King regards,
Prakash

Re: How to display/cover a map area by geo locations

Posted: Fri Dec 22, 2017 9:23 am
by Bernd Welter
Hello Prakash,

I moved your topic to the PTV Webclients forum as it deals with a specific framework and requires a dedicated response.

Furthermore I'll forward the thread to the developer of the AJAXMAPS and ask him to provide a sample. From what I read in your statement you need a sample that demonstrates the selection of objects in a map, right?

Best regards,
Bernd

Re: How to display/cover a map area by geo locations

Posted: Fri Dec 22, 2017 12:26 pm
by Oliver Heilig
Hi Prarakash,

think this isn't a possible with the ajax control out-of-the-box. It seems you need some GIS methods for your task, i.e. intersect your polygon (which is a convex hull?) with the polygon of the country border. This means you also need those country borders as polygons plus a geometric library (for example the geo-functions of D3 https://d3js.org/).

Another solution for your problem could be the use of voronio-regions with d3-voronoi https://github.com/d3/d3-voronoi, see http://oliverheilig.github.io/voronoi-territories/

Oli