Personalized map

Mark 3 years ago

I am very interested though probably was afraid to be told RTFM ;)

Ok, we had tried several things. One of them is adding this link: https://upande.com/temp/ke_907247_221010_10km2.mbtiles. Is this one in the correct format? It was created with QGIS.

But it also gives quite some errors if I inspect the page. I am not a hardcore developer so may be overlooking something basic.

Thanks for your prompt replies.

Anton Tananaev 3 years ago

No, it's not correct. Have you actually read our official documentation before attempting this?

https://www.traccar.org/map-layers/

Mark 3 years ago

Yes, through that link I was able to add Google maps. I realise the mbtiles is not file based xyz, which probably is what I need. I have used QGIS to specifically create XYZ directory (not mbtiles) and those now load without an error. Though I am still struggling to make sure they load, still seeing an empty map though I could be overlooking something still. Making some headway...

Mark 3 years ago

Can you confirm this is now a proper xyz file? https://upande.com/temp/test2

Mark 3 years ago

Any guidance would be appreciated @anton

Anton Tananaev 3 years ago

I don't know what to say. Where are the placeholders? The URL doesn't even return anything. Have you read the documentation? Have you looked at the examples?

Mark 3 years ago

Oops, that folder itself is not public, this is the image to one of the tiles that follows the placeholder method further down that url path, if I understand it correctly. https://upande.com/temp/test2/12/2480/2063.png. It doesn't give an error, but when I zoom to this area, I am not getting the tile to appear. I have read the manual yes though not quite there yet!

Anton Tananaev 3 years ago

So what's the URL you're using in the settings?

Mark 3 years ago

I tried both https://upande.com/temp/test2/12/2480/2063.png and https://upande.com/temp/test2/12/2480/. I then search for a nearby landmark as all tiles are white and I can't browse there easily otherwise. Not seeing any errors, but not seeing the tiles either yet. I must be close though!

Anton Tananaev 3 years ago

The documentation says:

It has to be a special URL with {x}, {y} and {z} placeholders.

Where are the placeholders in your URL?

Mark 3 years ago

I have picked up my attempts again to crack this and I figured getting custom xyz to work with a public web service is the best start (before loading own xyz files).

I am testing examples as described here. If I understand correctly, I have to take the url with placeholders (variables), e.g. https://tile.openstreetmap.org/{z}/{x}/{y}.png

Whatever I pick though remains as a white background without showing the tiles. Is there a setting file I have to attend to perhaps on our server?

Many thanks.
Mark

Anton Tananaev 3 years ago

Have you checked the browser developer tools to see what's going on?

Mark 3 years ago

Yes, I had found some errors suggesting it needs PNG, yet the url I am feeding is asking for a PNG. I tried googling this and found a work around that was being proposed, though I am not sure if this is the way forward.

A solution for it is provided here https://github.com/mapbox/mapbox-gl-js/issues/10277

Thanks for your pointers...

There is this error "could not load image because of The source image could not be decoded.. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."

Anton Tananaev 3 years ago

Have you checked the response to see if you're actually getting an image? And what headers you're getting.

Mark 3 years ago

We have checked and it seems we are not getting an image, perhaps we need access tokens for the custom OSM maps?!