How to display/cover a map area by geo locations

This forum deals with any kind of web based client technology, whether it is the well known java script based Ajax servlet or the upcoming approaches such as Leaflet, OpenLayers and so on.

How to display/cover a map area by geo locations

Postby Prakash » Fri Dec 22, 2017 9:02 am

Hi,

I am using Ajax Map and need to show all given geo locations covered in an area as below:

expectedMapView.png
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:

currentView.png
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
Prakash Kumar
Developer
Webdirekt India Pvt. Ltd.
Prakash
 
Posts: 17
Joined: Mon Sep 14, 2015 5:21 am

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

Postby Bernd Welter » Fri Dec 22, 2017 9:23 am

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
Bernd Welter
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
 
Posts: 1623
Joined: Mon Apr 14, 2014 10:28 am

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

Postby Oliver Heilig » Fri Dec 22, 2017 12:26 pm

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
Oliver Heilig
Chief Developer Logistic Services
PTV GROUP - Germany

https://github.com/oliverheilig/
User avatar
Oliver Heilig
 
Posts: 139
Joined: Tue May 13, 2014 12:10 pm
Location: Karlsruhe, Germany


Return to PTV Webclients (Ajax, Leaflet, OpenLayers, WMS, ...) (Admin=LNM)

cron