Custom map query coordinate conversion

Freddie3 years ago

Makes sense!

Thanks again for your work, it makes everything amazingly easy :D

Gav S3 years ago

Hi Andy,

So excited that I may be able to get OS Maps for my RAFAC DofE Group's trackers!!
I've added my API key to the BaseMaps and uploaded the 3 files to my server via SFTP

One stumbling block: how do I run in debug mode? Is this a setting in the traccar.xml file?

Freddie3 years ago

You can test in debug mode by appending /debug.html to the end of the URL you access Traccar through.

If you're happy with it, you can run a minify script from the tools folder to rebuild the full app with your changes, though I confess I've never got round to installing the dependencies for it

Andyw3 years ago

Hi Gav,

Pls not the version I have on here is from traccar 4.12, it won't work correctly with the latest version (4.12). I do have the code for 4.13 ready, I've changed it so that the KEY is now added via the UI the same as the bing key. Let me know if you'd like this version. I'll also contribute this to GIT when I get a minute.

-Andy

Gav S3 years ago

Would be good to have the new code please Andy. I am using a brand new installlation so it is 4.13, and it didn;t work at first, but it's just started working, which has puzzled me a little. Can't over-state how awesome this is, have been looking at ways to get OS Maps for my trackers for a few years, but I'm not good enough at coding to do anything smart myself.

Andyw3 years ago

Hi Gav,
OK here's the 4.13 version. Just extract over the top of a base 4.13 install. Put you key in using the GUI - Same place as BING key

Pls let me know if it works. You may need to clear your browser cache 1st time you run it. If you don't want to use the compiled binary then I can send you the source code, for you to compile your self or wait until I get chance to do a pull request to the office GIT

https://www.mediafire.com/file/ae8dttvgfmgcahr/traccar-4.13.zip/file

-Andy

Chris2 years ago

have you got this working with the new ver 5 ?

Will_ed2 years ago

If you're looking of OS Leisure maps then this isn't currently possible as Map Libre only supports epsg:3857 whereas leisure is epsg:27700

It is under consideration with Map Libre to support this and you can vote for the feature here

DeanoX2 years ago

Another new user here - Hello! . Also exploring Ordnance Survey Leisure mapping for DofE expedition tracking. Loving what I'm seeing so far.

Ross Codrai2 years ago

Thanks all for the work on this, I'm looking to try this as I have scout Groups and DofE groups that would really benefit from OS map layer. Thanks

Aaron Donnellya year ago

For anyone still interested in this topic see https://github.com/maplibre/maplibre/discussions/163

AndyBa month ago

Is there anyone still active from this thread that might be able to send me files to get OS Leisure Maps working? I've got the api key etc all working, but stuck on what to edit.

I'm struggling to understand why this (with my key) works

https://api.os.uk/maps/raster/v1/zxy/Road_3857/{z}/{x}/{y}.png?key=[personal key]

but this does not;

https://api.os.uk/maps/raster/v1/zxy/Leisure_27700/{z}/{x}/{y}.png?key=[personal key]

The latter being the leisure maps I am after.
Im a Scout leader and we are using traccar for out activities & hikes.
Many thanks
Andrew

Anton Tananaeva month ago

You should set your URL in the "custom map" field in the server settings.

Freddiea month ago

The reason your first link works and the second one doesn't is due to the differing underlying coordinates system I believe (that's the 3857 Vs 27700 bit).

I'm not an expert on the nitty gritty details, but I believe OS Leisure map data is based on the UK national grid system datum (known as 27700 to proper map geniuses) whereas the rest of maps used globally are based on the WGS84 datum (known as 3857).

OS offer the other map products (road/outdoor) aligned to both 3857 and 27700, but the Leisure mapping is only on 27700.

As others have said above, earlier versions of Traccar used a different library to draw the map, which could use either one, but MapLibre (used in v5) only works with 3857, as that's what the majority of online map tile sources use.

I may have the files you're after for Traccar 4 buried on a laptop somewhere, but it'll be a week or so before I can check unfortunately

Anton Tananaeva month ago

Oh yeah, that's right. We only support EPSG:3857.