Leaflet.js - How can I draw a polygon that automatically covers a group of markers? - maps

I´m working with Leaflet.js and I have a lot of markers but I want to get a polygon drawn automatically containing a specific group of markers.
There´s an image:
Every marker has a specific radio, so if a use it, would be like this:
but I don't want that, I want an area that contains markers, I don't know how can I do that.

You might want to create a convex hull.
https://gis.stackexchange.com/questions/215137/how-to-create-a-convex-hull-with-leaflet-points:
"The easiest way to do this with javascript is to use Turf.js's convex functionality."
A working sample - http://bl.ocks.org/ebrelsford/c31f61d39d2cd559e18a

Related

Smart map with grid in react. Accessible via coordinates. Cell multi choose ability

i wanted to ask how react can be used to build a smart map with cells on top. i would like to limit the area to a square.
the cells should be accessible via coordinates.
Attached is a picture of how I imagine it to be.
Thank you
Picture of example

Cesium Draw and Measure tools for 2D maps?

I am using Cesium to display a strictly 2D map in the browser (wrapped in React using the Resium library).
I am interested in giving the user the option to draw lines\polygons, and to measure the distances between two points or the area withing the polygon.
Basially, I want precisely this OpenLayeres example, but in Cesium: https://openlayers.org/en/latest/examples/measure.html
How would one go about doing it?
Thank you
I was doing some research on cesium drawing tool library.
It wasn't same as the one you asked but you can use it for your need. you can use for 2D and 3D maps. it gives all basic functionalities like draw circle, polygon, add marker, draw line, calculate distance etc.
I have found cesium-draw the library for the VUE.
[cesium draw ](https://www.npmjs.com/package/cesium-draw)<br>
If you can work with Angular their is a lot of cesium sport in angular so you can use
[angular-cesium](https://angular-cesium.com/)
if you have found any thing else please do share I love to see.

Efficiently display multiple markers on WPF image

I need to display many markers on a WPF image. The markers can be lines, circles, squares, etc. and there can be several hundreds of them.
Both the image source and the markers data are updated every few seconds. The markers are associated with specific pixels on the image and their size should be absolute in relation to the screen (i.e. when I move the image the markers should move along with it, but if i zoom in, they should take the same space of the screen as before).
Currently, I've implemented this using the AdornerLayer. This solution has several problems but the most significant one is that the UI doesn't fare well under the load even for 120 such markers.
I wanted to ask what would be the best way to go about implementing this? I thought of two solutions:
Inherit from Canvas and make sure it is invalidated not for every
added marker but for a range of markers at once
Create a control that holds an image and change its OnDraw to draw all the markers
I would appreciate some pointers from someone with experience with a similar problem.
Your use case looks quite specialized, so a specialized solution seems in order. I'd try a variant of your second option — extend Image, overriding its OnRender method.

Drawing maps in WPF

I want to draw a map in WPF without using any third party controls.
I need each and every state of all the countries, and based on certain conditions I want to color them.
How can I get the polygon shapes of each state of all the countries?
Here is an SVG file with all the states as separate polygons (look at the source!)
You can convert it to xaml if you want and fill the state differently.
EDIT
Just google for svg world map. One of the first hits seems to be a nice resource.

Problem in Shapefiles

i need a help
i have a shape file that continue 3716 polygon record and want to draw this shape file where some of those polygons need to have a specified color
OR WANT a search technique to search this map for a point (lat-long) and get it's belong polygon but not by searching all polygons
i tries all, OpenJump-Source code, GeoTools,....
In GeoTools you can follow the Style tutorial to show you how to display your shapefile. There is no way to carry out a point in polygon search without at least examining the bounding box of each polygon but the GeoTools Query Lab will talk you through the basics of setting up a query (and if your shapefile has a spatial index then it will be quick enough).

Resources