parent
710db47d6c
commit
256d6c631c
5 changed files with 10 additions and 6 deletions
|
@ -216,7 +216,7 @@ class Map(NamedModel):
|
|||
"umap_id": self.pk,
|
||||
"onLoadPanel": "none",
|
||||
"captionBar": False,
|
||||
"default_iconUrl": "%sumap/img/marker.png" % settings.STATIC_URL,
|
||||
"default_iconUrl": "%sumap/img/marker.svg" % settings.STATIC_URL,
|
||||
"slideshow": {},
|
||||
}
|
||||
)
|
||||
|
|
4
umap/static/umap/img/marker.svg
Normal file
4
umap/static/umap/img/marker.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg version="1.1" id="circle" xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15">
|
||||
<path d="M14,7.5c0,3.5899-2.9101,6.5-6.5,6.5S1,11.0899,1,7.5S3.9101,1,7.5,1S14,3.9101,14,7.5z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 254 B |
|
@ -132,7 +132,7 @@ function initMap(options) {
|
|||
map_update_permissions: '/map/{map_id}/update/permissions/',
|
||||
map_download: '/map/{map_id}/download/',
|
||||
},
|
||||
default_iconUrl: '../src/img/marker.png',
|
||||
default_iconUrl: '../src/img/marker.svg',
|
||||
zoom: 6,
|
||||
share_statuses: [
|
||||
[1, 'Tout le monde (public)'],
|
||||
|
|
|
@ -46,7 +46,7 @@ def test_can_change_picto_at_map_level(map, live_server, page, pictos):
|
|||
marker = page.locator(".umap-div-icon img")
|
||||
expect(marker).to_have_count(1)
|
||||
# Should have default img
|
||||
expect(marker).to_have_attribute("src", "/static/umap/img/marker.png")
|
||||
expect(marker).to_have_attribute("src", "/static/umap/img/marker.svg")
|
||||
edit_settings = page.get_by_title("Edit map properties")
|
||||
expect(edit_settings).to_be_visible()
|
||||
edit_settings.click()
|
||||
|
@ -66,7 +66,7 @@ def test_can_change_picto_at_map_level(map, live_server, page, pictos):
|
|||
symbols.click()
|
||||
expect(marker).to_have_attribute("src", "/uploads/pictogram/star.svg")
|
||||
undefine.click()
|
||||
expect(marker).to_have_attribute("src", "/static/umap/img/marker.png")
|
||||
expect(marker).to_have_attribute("src", "/static/umap/img/marker.svg")
|
||||
|
||||
|
||||
def test_can_change_picto_at_datalayer_level(map, live_server, page, pictos):
|
||||
|
@ -147,7 +147,7 @@ def test_can_use_remote_url_as_picto(map, live_server, page, pictos):
|
|||
marker = page.locator(".umap-div-icon img")
|
||||
expect(marker).to_have_count(1)
|
||||
# Should have default img
|
||||
expect(marker).to_have_attribute("src", "/static/umap/img/marker.png")
|
||||
expect(marker).to_have_attribute("src", "/static/umap/img/marker.svg")
|
||||
edit_settings = page.get_by_title("Edit map properties")
|
||||
expect(edit_settings).to_be_visible()
|
||||
edit_settings.click()
|
||||
|
|
|
@ -428,7 +428,7 @@ class MapDetailMixin:
|
|||
"urls": _urls_for_js(),
|
||||
"tilelayers": TileLayer.get_list(),
|
||||
"editMode": self.edit_mode,
|
||||
"default_iconUrl": "%sumap/img/marker.png" % settings.STATIC_URL, # noqa
|
||||
"default_iconUrl": "%sumap/img/marker.svg" % settings.STATIC_URL, # noqa
|
||||
"umap_id": self.get_umap_id(),
|
||||
"starred": self.is_starred(),
|
||||
"licences": dict((l.name, l.json) for l in Licence.objects.all()),
|
||||
|
|
Loading…
Reference in a new issue