URL template help request

More
5 years 7 months ago #12335 by Arany
URL template help request was created by Arany
Hello,

I'm trying to use URL template as new map type, and tried to add Voyager style from Carto. I can use this style in SP page builder Openstreetmap addon, and works perfectly, but if I use the exact same URL in ZhOSM, it does not work properly.

I attached some screenshots, I think the problem is in connection with the map type width and height parameters. If I set the new map type width and height 100 and 100 The Carto map looks at the same zoom level like a square and placed wrong, the Mapnik is OK.
Could you help to find the solution?

Sincerely,

Gergely Arany
Attachments:

Please Log in or Create an account to join the conversation.

More
5 years 7 months ago #12336 by Dima
Replied by Dima on topic URL template help request
Hi.
Sorry for delay. I was on vacation.

I didn't clear understand.
First image - it is my extension?
For map size width and height = 100% you should set width = 0 and height = 0, not simple 100

If you give direct link to map I can analyze what is going wrong (or we can speak for definite case)

Don't forget support my developments: post review in JED , donate , help with translation ;)

Please Log in or Create an account to join the conversation.

More
5 years 7 months ago #12337 by Arany
Replied by Arany on topic URL template help request
Hi,

No problem.
Both images are from the ZhOSMMap extension, the same article, same map, same zoom level, the only difference is that I switched the map type. First is custom map type (Carto Voyager), Second is the original Openstreetmap. If I set width and height both "0" at the custom map type, the result is a simple gray screen (btw I knew, 100 is not for 100% but 100px)
You can see an example here . The custom map type width and height are both "50", the URL template is
Code:
https://cartodb-basemaps-{s}.global.ssl.fastly.net/rastertiles/voyager/{z}/{x}/{y}{r}.png
.
Thank you for the help.

Please Log in or Create an account to join the conversation.

More
5 years 7 months ago #12338 by Dima
Replied by Dima on topic URL template help request
Check correct template URL

Look at image. You can see 404 error, and URL for what it tries to get tiles

Don't forget support my developments: post review in JED , donate , help with translation ;)
  • Please Log in or Create an account to join the conversation.

    More
    5 years 7 months ago #12339 by Arany
    Replied by Arany on topic URL template help request
    Hi!

    I can not figure out what is the problem with the URL, but I find some interesting things:
    If you try URL1 and URL2 , you get the tiles what I need, first is simple OSM, second is CartoDB. As you can see, there is nothing wrong with the URL template, but the component tries to request images from a wrong URL when you change the map on front-end. It seems that the exact tile URL-s are in connection with the custom map type width and height. If I set both "1", when I switch to Carto Voyager on front-end, miracle happens, it tries to download millions of images and the browser crashes.
    What could be the problem? :)

    Please Log in or Create an account to join the conversation.

    More
    5 years 7 months ago #12340 by Dima
    Replied by Dima on topic URL template help request
    Look at my image. on the right you can see @2 in URL.

    Try to remove {r} from URL tile template

    Don't forget support my developments: post review in JED , donate , help with translation ;)

    Please Log in or Create an account to join the conversation.

    Time to create page: 0.209 seconds
    Powered by Kunena Forum