You can get a list of all the map-markers of a map by using the following endpoint.
{warning} Don't forget that all endpoints documented here need to be prefixed with
api/1.0/campaigns/{campaign.id}/
.
Method | URI | Headers |
---|---|---|
GET/HEAD | maps/{map.id}/map_markers |
Default |
{
"data": [
{
"circle_radius": null,
"colour": "/it/api-docs/1.0/map_markers#008000",
"created_at": "2020-07-25T10:10:30.000000Z",
"created_by": null,
"custom_icon": null,
"custom_shape": "500,500 500,600, 600,600 600,500",
"entity_id": null,
"font_colour": null,
"icon": "1",
"id": 31,
"is_draggable": false,
"is_private": false,
"latitude": "422.857",
"longitude": "499.000",
"map_id": 2,
"name": "Shape",
"opacity": 100,
"polygon_style": array,
"shape_id": 5,
"size_id": 1,
"updated_at": "2020-07-25T10:10:30.000000Z",
"updated_by": null,
"visibility": "all"
}
]
}
To create a map marker, use the following endpoint.
Method | URI | Headers |
---|---|---|
POST | maps/{map.id}/map_markers |
Default |
Parameter | Type | Detail |
---|---|---|
name |
string (Required without entity_id ) |
Name of the map marker |
entity_id |
string (Required without name ) |
Entity linked to the map marker |
map_id |
integer (Required) |
The parent map |
latitude |
float (Required) |
Latitude of the marker |
longitude |
float (Required) |
Longitude of the marker |
shape_id |
int (Required) |
Shape of the marker (1 for Marker, 2 for Label, 3 for Circle, 4 for Polygon) |
icon |
int (Required) |
1 for Marker, 2 for Exclamation, 3 for Interrogation, 4 for Entity |
group_id |
int |
ID of the marker group |
is_draggable |
boolean |
If the marker is draggable on the map |
custom_shape |
string |
Polygon coordinates |
custom_icon |
string |
HTML of the custom icon |
size_id |
int |
1 to 6 for size (used by circles, 6 being custom) |
opacity |
int |
0 to 100 opacity |
visibility |
string |
all , admin , admin-self or self |
colour |
string |
Hex colour code with leading # |
font_colour |
string |
Hex colour code with leading # |
circle_radius |
null or int |
If the shape_id is 3 (circle) and size_id is 6 (cursom), can provide a custom circle radius size |
polygon_style |
null or array |
Polygon rendering options include stroke , stroke-width and stroke-opacity |
{success} Code 200 with JSON body of the new map.
To update a map, use the following endpoint.
Method | URI | Headers |
---|---|---|
PUT/PATCH | maps/{map.id}/map_markers/{map.id} |
Default |
The same body parameters are available as for when creating a map.
{success} Code 200 with JSON body of the updated map.
To delete a map, use the following endpoint.
Method | URI | Headers |
---|---|---|
DELETE | maps/{map.id}/map_markers/{map.id} |
Default |
{success} Code 200 with JSON.