caver456 on 09 Sep, 2018 07:01 PM
Second that - we would find it very useful too - either a URL-encoded zoom/pan, or an HTTP request handler to zoom to a certain coord and zoom level, or a certain object. Our use case is that we add an object using an HTTP request, and would then like to pan/zoom to it. In that case, we already know the coordinates to zoom to.
Yes, exactly. Ideally we could have a single saved map with SAR-relevant objects of interest documented it covering 30 square miles, and be able to hyperlink to specific named things on that map at a pre-set zoom level. Saved map support for url params (Lat Long, Zoom level, and Base map) would completely satisfy our use case. Frankly we could live without definable base map if defaulting to the one defined with the saved map would make this easier.
matt on 13 Sep, 2018 05:27 AM
I've added url hash support for saved maps, mirroring the map.html page.
I do want to make clear that I haven't thought this through 100%, so I can't make any long-term guarantees this feature won't get dropped or modified if it winds up causing other complications. I can't think of any at the moment, but time spent developing infrastructure around it is done at your own risk.
That is absolutely amazing. I'll start experimenting with it provisionally, and let you know if there's anything that crops up, though I can't currently think of any scenarios where this would introduce any extra performance hits, etc. Particularly since you've set it up to strip the arguments from the url before you render the page. If I can be so bold as to make some assumptions, I suppose this would mean that the map is ending up in the exact same state it would have had the user fetched the saved map, and then manually set the zoom, pan, and base map. This seems like quite a smart choice for the purpose of reducing potential unintended consequences. At first I wasn't sure if I agreed with the choice to reset the url, but the more I think about it, the more it seems like the correct choice.
It would be nice if the arguments could automatically follow the user selections, because then it would not require any specialized knowledge to create a deep link like this. Any settings made manually would be tracked in the url, and so if a user copies it from the browser, and shares it via text, email, etc., the next person will see the same state they sent.
In any case, I realized I'm gilding the lily. That's what users are meant to do, right?
I'm really still in shock, and pleased as punch to have suggested an idea, and see it implemented in production within a week. Thank you very much.
matt on 13 Sep, 2018 05:46 PM
Will not make the next one - felt a little too risky - so probably in another month or so.
However that release will also include a database switch from hsql to sqlite (for multiple reasons), so it might take you a little longer to get it rolled out as it will also affect backup scripts, you'll want to migrate data, etc.