Commit graph

1334 commits

Author SHA1 Message Date
Roman Deev
dae7a003fe Use baselayerchange/overlaylayerchange instead of layeradd/layerremove for speed up Map Data layer render 2025-01-27 15:44:46 +03:00
Tom Hughes
6316745c2e Merge remote-tracking branch 'upstream/pull/5551' 2025-01-26 10:24:05 +00:00
Tom Hughes
64859303f6 Merge remote-tracking branch 'upstream/pull/5538' 2025-01-26 10:21:44 +00:00
mmd-osm
87e995bd84 Added error handling for data layer 2025-01-24 23:14:08 +01:00
Andy Allan
6b06be5e5d Fix some eslint errors (quotes, spacing and parseInt radix) on .js.erb files
These have been flagged by eslint-plugin-erb, and need to be fixed before
that plugin can be enabled.
2025-01-24 14:38:13 +00:00
Anton Khorev
f2903b8223 Initialize I18n and OSM as soon as application.js loads 2025-01-23 08:34:21 +03:00
Tom Hughes
c2b39a6a7c Merge remote-tracking branch 'upstream/pull/5529' 2025-01-22 17:59:34 +00:00
mmd-osm
18fd80ebb7 Consistent usage of layer information in _osm_location cookie
Fixes #3971
2025-01-21 18:08:50 +01:00
Tom Hughes
ebeef2899a Enable I18n fallback for the embed page
Fixes #5526.
2025-01-20 11:42:23 +00:00
Marwin Hochfelsner
01d8dba8ce Allow map layers to specify an alternate tile set for dark mode 2025-01-18 11:50:54 +00:00
Anton Khorev
9d7e59784f Install add/remove event listeners directly on note layer 2025-01-15 02:02:47 +03:00
Etilène Jourdier
0f2df0b9ef display an encouragement to contribute after many anonymous notes
create a counter of anonymous notes in a cookie, read by new note controller to display an encouragement to contribute in the already existing anonymous warning if the anonymous visitor has already created at least 10 anonymous notes. Cookie deleted on log-in and sign-up after email validation
2025-01-13 14:36:21 +03:00
Anton Khorev
937d461106 Update arguments of data overlay interestingNode() 2025-01-07 11:26:15 +03:00
Tom Hughes
6e444155d6 Merge remote-tracking branch 'upstream/pull/5471' 2025-01-05 16:23:49 +00:00
Anton Khorev
c887f1d7b2 Use details attribute to render changeset bounding box
Do this instead of using L.OSM.DataLayer. DataLayer makes an extra request just to get the bbox. Also it expects bbox to always exist, which is not true for some changesets.
2025-01-05 18:18:33 +03:00
Anton Khorev
b816f5b27e Remove 'center' argument of addChangeset()
It is always set to true.
2025-01-05 17:28:36 +03:00
Anton Khorev
7a99295884 Remove zoomend listener on history unload 2025-01-05 15:02:25 +03:00
Anton Khorev
27aa2ed591 Move new note marker to click location
If not done, it's possible to lose the marker when starting from low zooms.
2025-01-01 02:34:22 +03:00
Anton Khorev
5603309026 Decrease new note marker opacity when zoomed out 2025-01-01 02:34:22 +03:00
Anton Khorev
feb7af2020 Let page.load proceed when zoomed out, disabling submit
Note that addNoteButton.hasClass("active") check in page.load is useless because page.unload removes this class.
2025-01-01 02:32:06 +03:00
Anton Khorev
17ab002c04 Remove active class from addNoteButton only in page.unload()
Same reasons as in the previous commit.
2025-01-01 02:13:59 +03:00
Anton Khorev
5542858315 Call removeNewNoteMarker() only from page.unload()
It was also called from noteCreated() but that triggered page.unload() via OSM.router.route().
2025-01-01 02:13:59 +03:00
Anton Khorev
6cc31259e4 Add addNewNoteMarker() and removeNewNoteMarker() functions
This ensures that marker is always added/removed together with its halo.
2025-01-01 02:13:59 +03:00
Anton Khorev
4ea6077ddb Convert newHalo() to addHalo() and removeHalo()
newHalo() wasn't always creating new halos. It had an event type argument that was checked against drag event. Depending on this check, newHalo() could remove the halo.
2025-01-01 01:53:55 +03:00
Anton Khorev
f1835c914c Move new note page.pushstate/popstate next to page.load 2024-12-31 23:47:55 +03:00
Anton Khorev
dc59b37fe1 Add new note marker to root map layer instead of noteLayer
We want the new note marker in the same layer with its halo. Also we don't want to put anything in noteLayer because it clears its contents on certain zoom levels.
2024-12-31 23:47:55 +03:00
Anton Khorev
18f3adbf5d Remove unused return value of addCreatedNoteMarker()
This function adds a marker to notes layer. This controller doesn't need to do anything with markers of existing notes.
2024-12-31 23:46:29 +03:00
Anton Khorev
ae5b7812cc Rename updateMarker() to addCreatedNoteMarker()
This function doesn't update any existing marker.
2024-12-31 23:46:29 +03:00
Anton Khorev
9d8ca8be11 Pass location instead of marker to createNote() 2024-12-31 23:42:40 +03:00
Anton Khorev
954eafd424 Move create note callback to button click handler 2024-12-31 23:37:34 +03:00
Anton Khorev
f169299b53 Don't pass url to createNote() 2024-12-31 23:25:11 +03:00
Anton Khorev
63a4f12550 Pass text instead of form to createNote() 2024-12-31 23:22:59 +03:00
Anton Khorev
fa0c12cdcd Disable new note submit button in click handler 2024-12-31 23:02:47 +03:00
Anton Khorev
c4709e2a05 Rename newNote to newNoteMarker 2024-12-31 22:37:41 +03:00
Anton Khorev
c4e473ed89 Wrap diary entry location coordinates 2024-12-25 00:55:36 +03:00
Anton Khorev
2ba85472be Change image download warning message to a list 2024-12-19 18:58:32 +03:00
Anton Khorev
6c1704b245 Add 'canDownloadImage' layer option 2024-12-19 18:58:32 +03:00
Tom Hughes
5ce51e9748 Merge remote-tracking branch 'upstream/pull/5419' 2024-12-19 08:42:02 +00:00
Anton Khorev
25e4a80760 Get note text only from textarea within left sidebar 2024-12-19 05:22:54 +03:00
Anton Khorev
2c57c66195 Center share popup inside the browser window 2024-12-19 04:25:15 +03:00
Anton Khorev
8a8c2517f2 Add 'canEmbed' layer option 2024-12-18 18:36:44 +03:00
Anton Khorev
2c84465cc2 Add map.getMapBaseLayer() 2024-12-18 18:31:46 +03:00
Anton Khorev
de0bf25499 Rename return values of getMapBaseLayerId() to layerId 2024-12-18 18:28:18 +03:00
Anton Khorev
7e7ede890e Merge branch 'pull/4985' 2024-12-18 16:35:01 +03:00
Emin Kocan
95e1aff234 Add social sharing functionality 2024-12-17 23:36:47 +01:00
Martin Raifer
1ba5b7fef0
iD: listen to manual hashchanges from iframe parent
Pan to the new `map` location when the hash change was not not triggered by map interaction from inside iD itself.

This mirrors the behaviour when manually editing the `map` hash parameter on osm.org outside of iD.

This also fixes https://github.com/openstreetmap/iD/issues/10592 (error in js console when iD is opened outside of an iframe by directly navigating to osm.org/id).
2024-12-11 14:59:57 +01:00
Anton Khorev
bfc8c5f6de Rename 'keyid' layer option to 'layerId' 2024-12-10 01:23:41 +03:00
Tom Hughes
7b05c1c060 Merge remote-tracking branch 'upstream/pull/5375' 2024-12-08 14:55:55 +00:00
Anton Khorev
02257f7294 Allow specifying extra layer options in layers.yml 2024-12-07 19:21:36 +03:00
Anton Khorev
821ebdd57b Use fetch() instead of iframe to make remote control requests 2024-12-04 12:30:19 +03:00