Closed AntoJvlt closed 3 years ago
It's probably a good idea to stick to the convention established by https://openstreetmap.org. It creates a hash of the format: #map={z}/{x}/{y}&layers={layername}
.
The layer selection doesn't work for me:
null
while I'd expect no layer number to show up in the URLIt might be nicer to use the short name of the layer instead of a number. That makes the URL future-proof against reordering of the layers.
I switched to the convention used by openstreetmap.org and bugs should be resolved now.
It is possible to copy map hash from the nominatim qa into openstreetmap.org even if the x coordinate can get a lot bigger (if you scroll a lot to the right of the map for example, because of the multiworld) on the nominatim qa tool. It gets automatically rescaled on openstreetmap.org.
Do you think that we are good on this? You can check the dev instance for the running example.
osm.org uses an ampersand here:
#map=11.72/50.40/9.11?layer=boundary ways without relation
^
Regarding the name being used: it looks like there is an id
field in the layer.json
that should have a unique machine compatible id. Currently this field is always set to SuspectsData
. We should be setting that to some unique name consisting of [a-z0-9_] only and then use that for identification.
Oh yes little typo for the &.
I will update the analyser to add unique value for the id field of each rule and I will wait for it to spread on the server and over the generated data before modifying here.
Fixes #1
Implemented the URLStateManager which allows to store the current map view in the URL. Hence, we can reload the page and still have the same view on the map. The current layer selected is also stored in the URL so it gets automatically selected when reloading or when opening the page with an url containing a layer id.