This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Point rails port to different tile server

1
1

I have setup the RailsPort according to https://wiki.openstreetmap.org/wiki/Rails_port and now can access it through http://localhost:3000/. The tiles are being accessed from tile.openstreetmap.org. However I want it to point to tile.localhost where I've already setup apache with mod_tile.

Where do I change the configuration in the RailsPort for this?

asked 04 Nov '12, 09:01

bibstha's gravatar image

bibstha
76559
accept rate: 0%


One Answer:

1

I think I got the answer for this. I changed the lines in file /<path>/openstreetmap-website/vendor/assets/openlayers/OpenStreetMap.js

initialize: function(name, options) {
    var url = [
        "http://a.tile.openstreetmap.org/${z}/${x}/${y}.png",
        "http://b.tile.openstreetmap.org/${z}/${x}/${y}.png",
        "http://c.tile.openstreetmap.org/${z}/${x}/${y}.png"
    ];

and it works great.

answered 04 Nov '12, 09:24

bibstha's gravatar image

bibstha
76559
accept rate: 0%

what exactly you replace to make it work?

(17 Sep '14, 19:35) eyemax

I guess he replaced tile.openstreetmap.org with tile.localhost:3000.

(18 Sep '14, 07:52) scai ♦

No, this localhost:3000 is the url of the same rails port, not tile server.

I have been changing http://a.tile.openstreetmap.org for http://localhost/osm in every file I found in /<path>/openstreetmap-website/ but it looks like has not effect, I keep getting always the tiles from openstreetmap.org.

I need to see and edit my tile server info. please help.

(14 Nov '14, 02:31) eyemax

Source code available on GitHub .