Hajk icon indicating copy to clipboard operation
Hajk copied to clipboard

Infoclick: Be able to use x,y and zoom as params.

Open jesade-vbg opened this issue 2 years ago • 6 comments

We need the possibility to access and use {x}, {y} and {zoom} in infoclick templates to create links etc containing these.

Similar to: https://github.com/hajkmap/Hajk/issues/1076#issue-1225284701

Maybe group these as {click:param}

{click:x}
{click:y}
{click:zoom}

Edit: I've also added the possibility to convert the coordinates to another projection. Example: {click:x|toProjection('x', 'click:x', 'click:y','EPSG:4326', 4)} this converts x to EPSG:4326 (used by google etc) {click:y|toProjection('y', 'click:x', 'click:y','EPSG:4326', 4)} this converts y to EPSG:4326 (used by google etc) So now you should be able to create links to a wide variety of map services.

jesade-vbg avatar Aug 23 '22 08:08 jesade-vbg

@jesade-vbg Can you tag and mark as done please?

jacobwod avatar Sep 01 '22 11:09 jacobwod

Is this done? Have I missed something?

jesade-vbg avatar Sep 01 '22 11:09 jesade-vbg

I thought it was completed in 3b565d885bf331d1990e1f38ba1159518040d1cb, but perhaps I mixed it up with something else? 😄

Edit: ahh.. it looks like two separate issues. Sorry!

jacobwod avatar Sep 01 '22 12:09 jacobwod

I have a suggestion, to make AppModel a singleton. The AppModel is passed around in alot of places in the code. As there is only one AppModel instance that coders want to access, why not make it a singleton?

Whats your opinion? @Hallbergs @jacobwod

Check this commit: https://github.com/hajkmap/Hajk/commit/e35b69d43008923d1b38cb942279eff857d55972

jesade-vbg avatar Sep 02 '22 12:09 jesade-vbg

Interesting! Perhaps we can talk about this some day this week?

jacobwod avatar Sep 05 '22 07:09 jacobwod

image AppModel and coordinate transforms seems trustworthy after refactoring. Transforms tested against GMaps and GStreetView.

jesade-vbg avatar Sep 07 '22 08:09 jesade-vbg