NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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:

All indexes on  planet_osm_line created  in 730s
Completed planet_osm_line
Stopped table: planet_osm_ways in 1310s
Osm2pgsql took 3916s overall

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?

asked 17 Nov '15, 15:33

Skyler's gravatar image

Skyler
11114
accept rate: 0%

edited 17 Nov '15, 17:26

I am not sure about any solution, but maybe you kan do a search on this FAQ site for "localhost" ...

(18 Nov '15, 17:03) stephan75

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:

http://localhost/

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.

permanent link

answered 18 Nov '15, 17:59

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

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

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×204

question asked: 17 Nov '15, 15:33

question was seen: 3,704 times

last updated: 20 Nov '15, 01:29

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum