Yet another (supposed to be simple) tool to add geo objects on map. Try it on GitHub Pages.
- Adding object(s) on the map:
- via inputting parameters (latitude, longitude and accuracy) in form fields for single object
- via inputting JSON array of coordinates for single or multiple objects
- via entering URL parameter
- by shift-clicking on the map
- with or without marker's pin or dot
- with custom color, line weight and line dashes
- by applying function to recently added objects (group objects)
- Supported object's types:
- point
- circle
- line and polyline
- polygon
- rectangle (only in JSON)
- List of added objects with opportunity to:
- view full info
- copy object to clipboard
- locate (fly to) certain object
- delete certain object
- copy all objects to clipboard
- show all objects
- delete all objects
- Map controls:
- selecting tile layers (OpenStreetMap, Wikimedia etc.)
- geolocating current position of the device
- show address (geocoding) in popup of object's markers (disabled by default in settings)
- ruler for measure distance
- Other:
- setting of object creation and other options
- store user settings in localStorage, also last clicked coordinates on the map as the center point of the map on next page load.
Parameter | Type | Description |
---|---|---|
type (required) |
String | Enum:
Type of the object. |
coords (required) |
Array of objects | Object of the form:{"lat": Number <double>, "lon": Number <double>} .Where lat is latitude, from -90.0 to 90.0, and lon is longitude, from -180.0 to 180.0.One object for type point or circle, and one or more for other. |
radius |
Number <double> | Radius of the circle, in meters. Only applicable and required to type "circle" , otherwise will be ignored. |
azimuth |
Number <double> | Direction in degrees east of True North (clockwise), from 0° to 360°. If set, the dot will be replaced with an arrow. Only applicable to type "point" and "circle" , otherwise will be ignored. |
color |
String | Stroke and fill CSS-color of the object. HEX, RGB(A), name etc. |
weight |
Number <integer> | Stroke width in pixels. Not applicable to "point" . |
dashedLine |
Boolean | Create dashes and gaps in the stroke. Not applicable to "point" . |
showMarkerPin |
Boolean | Allows to enable/disable the marker pin for object. |
showMarkerDot |
boolean | Allows to enable/disable the marker dot for object. |
Point
Example with all required parameters ("type"
, "coords"
) and almost all optional (name of "color"
, "azimuth"
, "showMarkerPin"
, "showMarkerDot"
):
[
{
"type": "point",
"coords": [
{
"lat": 55.039372,
"lon": 37.552016
}
],
"color": "black",
"azimuth": 45,
"showMarkerPin": false,
"showMarkerDot": true
}
]
Circle
Example with all required parameters (type
, coords
, radius
) and some optional (RGBA color
, showMarkerPin
):
[
{
"type": "circle",
"coords": [
{
"lat": 56.325227,
"lon": 37.854250
}
],
"radius": 10000,
"color": "rgba(51, 136, 255,0.95)",
"showMarkerPin": false
}
]
Polyline
Example with all required parameters (type
, coords
) and one optional (HEX color
):
[
{
"type": "polyline",
"coords": [
{
"lat": 55.124319,
"lon": 36.777198
},
{
"lat": 56.273381,
"lon": 38.777437
},
{
"lat": 55.630222,
"lon": 39.332448
}
],
"color": "#6e14ef"
}
]
Polygon
Example only with required parameters (type
, coords
):
[
{
"type": "polygon",
"coords": [
{
"lon": 36.426052,
"lat": 56.181837
},
{
"lon": 39.201706,
"lat": 56.160414
},
{
"lon": 38.987349,
"lat": 55.143146
},
{
"lon": 36.327118,
"lat": 55.290538
},
{
"lon":36.426052,
"lat":56.181837
}
]
}
]
Parameter | Type | Description |
---|---|---|
type (required) |
String | Only "group" . |
function (required) |
String | Enum:
Function of calculation. |
objectIDs (required) |
Array of integers | List of recently added objects IDS that will be proccessed by function. Must contain minimum one valid ID. |
color |
String | Stroke and fill CSS-color of the object. HEX, RGB(A), name etc. |
weight |
Number <integer> | Stroke width in pixels. Not applicable to "point" . |
dashedLine |
Boolean | Create dashes and gaps in the stroke. Not applicable to "point" . |
showMarkerPin |
Boolean | Allows to enable/disable the marker pin for object. |
showMarkerDot |
boolean | Allows to enable/disable the marker dot for object. |
This will add a "circle"
object around the objects with the given IDs:
[
{
"type": "group",
"function": "drawCircleBounds",
"objectIDs": [2, 3, 7],
"color": "black",
"weight": 1,
"showMarkerPin": false,
"showMarkerDot": true
}
]
Enter JSON into the text field on array tab. JSON must contain one array with one or more objects in curly brackets comma separated:
[{object_1}, {object_2}, ..., {object_n}]
Use URL parameter tab=array
together with addArray=[{obj_1}, {obj_2}, ..., {obj_n}]
:
https://bazhanius.github.io/simple-geo-tool/?tab=array&addArray=[{obj_1}, {obj_2}, ..., {obj_n}]