stadtnavi / digitransit-ui

Digitransit UI Clone, especially for the city of Herrenberg ("stadtnavi.de")
https://stadtnavi.de/
Other
13 stars 14 forks source link

Map base layer error depending on host system #591

Closed dancesWithCycles closed 3 years ago

dancesWithCycles commented 3 years ago

Hi folks, Thank you very much for creating and maintaining this repository. Please accept my appreciation.

I have two development environments both running Debian 10. One environment has a firewall activated allowing the following ports.

To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere                  
80                         ALLOW       Anywhere                  
443                        ALLOW       Anywhere                  
21/tcp                     ALLOW       Anywhere                  
3000                       ALLOW       Anywhere                  
20/tcp                     ALLOW       Anywhere                  
20:21/tcp                  ALLOW       Anywhere                  
30000:31000/tcp            ALLOW       Anywhere                  
22222/tcp                  ALLOW       Anywhere                  
3000/tcp                   ALLOW       Anywhere                  

The environment behind the firewall has difficulties presenting the street and satellite map base layers.

Street base layer:

stadtnavi_streets

Satellite base layer:

stadtnavi_satellite

Bicycle base layer:

stadtnavi_bicycle

On the environment without firewall the Stadtnavi UI works just fine. All three layers load as expected.

I did the same test with the master branch of the root Digitransit UI repository using the default configuration. All map base layers work just fine no matter with or without firewall.

I am using this master branch using the hb configuration. Is this configuration using other ports then the Digitransit UI default configuration?

I am running the UIs with the following instructions:

Stadtnavi:

sudo docker run -d --rm --name sn-ui -p 8080:8080 -e CONFIG=hb danceswithcycles/sn-ui:master

Digiransit:

sudo docker run -d --rm --name dt-ui -p 8080:8080 danceswithcycles/dt-ui:master

I appreciate every hint pointing me in the right direction. Cheers!

leonardehrenfried commented 3 years ago

As we want to reduce the load on our tile servers we only allow requests from a few select domains (ie. our own) and from localhost. If you want to get your domain/project included in that list, please get in touch at support@herrenberg.stadtnavi.de.

You can also host your own tiles, buy them from a commercial provider (Mapbox, Maptiler...) or use any other free tiles.

dancesWithCycles commented 3 years ago

Hi @leonardehrenfried , Thank you very much for clarification. Does that mean you are configuring dedicated tile servers for the respective base layers? I am wondering why some layers work and others not.

Does this mean base layers are working when I configure `MAP_URL with a different tile server?

I also found SEMI_TRANSPARENT_MAP_URL in the hb config file. Can you please tell me what this is used for?

I thank you very much for cooperation and remain with

Best regards

dancesWithCycles commented 3 years ago

Ok folks, I found the URLs for street , satellite and bicycle base layer in the hb config. Remains the question what SEMI_TRANSPARENT_MAP_URL is used for. Any hint?

leonardehrenfried commented 3 years ago

This URL configures the sem-transparent map layer that is being put on top of the satellite layer.

dancesWithCycles commented 3 years ago

What is the need for an extra layer on top of the satellite layer?

leonardehrenfried commented 3 years ago

So you can see street and place names.

dancesWithCycles commented 3 years ago

Alright. Thank you very much for clarification. Cheers!

MartinH-open commented 3 years ago

As we want to reduce the load on our tile servers we only allow requests from a few select domains (ie. our own) and from localhost. If you want to get your domain/project included in that list, please get in touch at support@herrenberg.stadtnavi.de.

You can also host your own tiles, buy them from a commercial provider (Mapbox, Maptiler...) or use any other free tiles.

Ah, that might explain why the Reutlingen test (during Öfficon) failed to display map data - but did work with the bike map .

dancesWithCycles commented 3 years ago

As we want to reduce the load on our tile servers we only allow requests from a few select domains (ie. our own) and from localhost. If you want to get your domain/project included in that list, please get in touch at support@herrenberg.stadtnavi.de. You can also host your own tiles, buy them from a commercial provider (Mapbox, Maptiler...) or use any other free tiles.

Ah, that might explain why the Reutlingen test (during Öfficon) failed to display map data - but did work with the bike map .

Yep. Same just happened to me. It makes sense to me, now that I found the different tile server addresses for street, satellite and bicycle layers. Looks like the load balancing is only in place for the street tile server.