Hello I am very new to openstreetmap, I am building my own Tiles server by following this https://switch2osm.org/manually-building-a-tile-server-16-04-2-lts/ I belived , i have done all right, all matches. i see a Small world map when i browser http://192.168.1.32/hot/0/0/0.png but when i am trying to create some tiles by following switcheroo-configured Chrome. with link https://www.openstreetmap.org/#map=8/23.572/91.686 by selecting Humanitarian, Its blank I dont see any log when i do this tail -f /var/log/syslog | grep " TILE " does it mean its not tiling ? Can any one Please help me with this please . Please let me know if you need any out from my server. Thanks asked 24 May '18, 14:15 fosiul
showing 5 of 8
show 3 more comments
|
We now have a content security policy in place where the server indicates to the browser what sites we expect various sorts of resources to load from, so if you trick the browser into using a different source like this then it will get rejected by that policy. If you look at the javascript console you should errors telling you the CSP is being violated by those load attempts. answered 24 May '18, 18:45 TomH ♦♦ 131Refused to load the image '<url>' because it violates the following Content Security Policy directive: "img-src 'self' data: <url> .wp.com .tile.openstreetmap.org .tile.thunderforest.com .openstreetmap.fr piwik.openstreetmap.org developer.mapquest.com". /#map=13/23.7498/90.4408&layers=H:1 Refused to load the image 'http://192.168.1.32/hot/13/6154/3539.png' because it violates the following Content Security Policy directive: "img-src 'self' data: www.gravatar.com .wp.com .tile.openstreetmap.org .tile.thunderforest.com .openstreetmap.fr piwik.openstreetmap.org developer.mapquest.com".
(24 May '18, 18:53)
fosiul
@fosiul, Please let us know if putting your own leaflet-based website in place lets you render maps. @tomh, Thank you for the confirmation.
(24 May '18, 18:56)
tim_rohrer
|
It looks like someone has (very recently) changed something that's broken this use of switcheroo. My guess is that it's at the osm.org end rather than in Chrome or Switcheroo. For more background about what this particular bit of browser nannying is supposed to do, see here. In the meantime, a simple leaflet-based website is probably the way to go. There are lots of leaflet examples around, and here is a simple one I created earlier.
permanent link
This answer is marked "community wiki".
answered 24 May '18, 18:30 SomeoneElse ♦ @SomeoneElse, I will have a look at that one you mentioned, however , Can I not Generate tile from the Database ? Since I have followed this tutorial , https://switch2osm.org/manually-building-a-tile-server-16-04-2-lts/ what is the best way to Genrate tiles from DB ?
(24 May '18, 18:56)
fosiul
1
If you want to generate lots of tiles then have a look at https://wiki.openstreetmap.org/wiki/User:SomeoneElse/Ubuntu_1804_tileserver_load - there's a render_list example there and also a "just the tiles in one area" one.
(24 May '18, 20:42)
SomeoneElse ♦
|
Hi , Regards to https://wiki.openstreetmap.org/wiki/User:SomeoneElse/Ubuntu_1804_tileserver_load#An_example_site I think, i am doing somethig silly , to make rendering, i typed this http://192.168.1.32/map/map.html with bellow changles, but nothing happend. not sure if i am doing right.
I Edited Scripts/leaflet_embed_small.js var hetznerUrl='//192.168.1.32/hot/{z}/{x}/{y}.png'; var osmUrl='//192.168.1.32/hot/{z}/{x}/{y}.png'; var deUrl='//192.168.1.32/hot/{z}/{x}/{y}.png'; var os201604Url='//192.168.1.32/hot/{z}/{x}/{y}.png'; var wikiUrl='//192.168.1.32/hot/{z}/{x}/{y}.png'; var gps2Url='//192.168.1.32/hot/{z}/{x}/{y}.png'; var mapillaryUrl='//192.168.1.32/hot/{z}/{x}/{y}.png'; var osdiffUrl='//192.168.1.32/hot/{z}/{x}/{y}.png'; edited map.html
answered 24 May '18, 19:45 fosiul 1
Before you added the files, did you get the Ubuntu/Apache "It Works!" page to show up? Now, after you added the code, do you still get that page? BTW, I suggest you post a new question for this issue. It isn't really an answer for your first question.
(24 May '18, 20:07)
tim_rohrer
@tim_roher Yes, I agree with you, i will create a new question for this . Thanks
(24 May '18, 20:19)
fosiul
|
Hello fosiul,
Could you give us more details on how you configured the “Switcheroo Redirector” extension ?
Thanks !
Hello Jbelien Please see the attached picture, I have used From : https://tile-a.openstreetmap.fr/hot/ to: http://192.168.1.32/hot/
From : https://tile-b.openstreetmap.fr/hot/ to: http://192.168.1.32/hot/
From : https://tile-c.openstreetmap.fr/hot/ to: http://192.168.1.32/hot/
Not sure if it's a cache problem, but I don't see an attached picture. Perhaps store it at an external image host and link to it from here?
Hi here is the link https://ibb.co/ktLeT8
Apart from that, Can i not just Generate Tiles from the DB? While reading , I understand, i can use "generate_tiles.py"
Since I have followed this tutorial https://switch2osm.org/manually-building-a-tile-server-16-04-2-lts/
and if i want to generate my own tiles with "generate_tiles.py" what do i have to do ?
Thanks for the help
Ok I am uploading anoter image. https://ibb.co/hdEL1T
if i Chose one option ( tick) then I can see map showing but they are broken, although i can map, but i dont think they actulling rendering in my disk . becuase the size of bellow it never increased.
renderaccount@opentile2:/var/www/html$ du -sh /var/lib/mod_tile 40K /var/lib/mod_tile renderaccount@opentile2:/var/www/html$
I was just getting ready to write a similar post :-)
I've got what appears to be the same issue, but have looked in Chrome's console and found the Content Security Policy is blocking images from loading. @fosiul, have you used Chrome's developer tools to see if you have any errors/notices in the browser?
I've gone further and cobbled some html/css/javascript (leaflet) code on the server. I can show maps from there using the MapBox service, but the same code on my server shows a blank map canvas.
I will post a full write up here in a few moments.
@fosiul, You're seeing some maps load when you un-tick the parts of the redirector extension because the browser is going to openstreetmap.org to get the data.