Hi, I am a Linux newbie, and want to create a tile server on my Ubuntu computer for the application Xastir to grab maps (for ham radio APRS use). I am trying to test it out, but I am just getting pink tiles when I visit http://localhost/osm/slippymap.html and select "local tiles" The Command I ran was osm2pgsql --slim -C 1500 --number-processes 4 ireland-and-northern-ireland-latest.osm.pbf (I used the Ireland maps for testing, and I ran this command on the home directory, and the same directory as the html page.) Here is how the above code finished executing:
According to the website "If you are not opening slippymap.html on localhost and you are seeing only pink tiles, you will need to edit the html page and replace localhost with the correct server name in ‘new OpenLayers.Layer.OSM(“Local Tiles”…’ or change it to a relative URL." Well, I am using localhost, and I don't know how to find the correct server name, nor what the relative URL means. Could someone point me in the right direction? |
Taking a bit of a step back, it's worth checking that tiles are being generated. Here's a location in Ireland (using osm.org to display it): http://www.openstreetmap.org/#map=18/54.50222/-8.18998 and if I right-click in the browser and "View image" the browser URL changes to: http://b.tile.openstreetmap.org/18/125108/83543.png The first part of this - "b.tile.openstreetmap.org" describes the server that's serving the tiles out. The second part "/18/125108/83543.png" is the path to one particular tile. It's a while since I've been through a "from packages", but from memory the URL for an individual tile is likely to be something like: http://localhost/osm/18/125108/83543.png When you go to this URL on a web browser on the same machine that you have gone through the "switch2osm" instructions on, you should see (after a short delay) is a map tile with an "Abrakebabra" on it, similar to what you get from "openstreetmap.org". If that doesn't work try just: and see what happens. "localhost" is just a name used to refer to the IPv4 address of the local machine - "127.0.0.1". If you know an actual IP address of the machine you've installed on you can replace "localhost" with that. Supposing I know that I'd installed on a machine with IP address "192.168.101.41" I could browse to: http://192.168.101.41/osm/18/125108/83543.png to see the same tile. There are no tiles. I can't find any PNG files on my system that were generated. When I right click on the image it says "not found" weather I view from localhost or the local IP.
(19 Nov '15, 02:08)
Skyler
1
I wouldn't expect to see .png files on disk - I'd expect to see ".meta" files (each one combining several .pngs) in directories below e.g. /var/lib/mod_tile/default/ (though "default" might be different for you). When "it says not found", what was the full URL of the thing that it said was not found?
(19 Nov '15, 09:34)
SomeoneElse ♦
The requested URL /osm/18/125108/83543.png was not found on this server.
(20 Nov '15, 01:18)
Skyler
There is definitely something wrong with my tile server. In /var/lib/mod_tile, there is only a file by the name of planet_import_complete. When I looked at this file with nano, it was blank.
(20 Nov '15, 01:29)
Skyler
|
I am not sure about any solution, but maybe you kan do a search on this FAQ site for "localhost" ...