Why not ask your question on the new OpenStreetMap Community Forum?


I have a local tile server which is setup using mapnik.

Following code is not working when I add my local map server URL.

Please tell me how can I add my local map in below sample code. Is there anything I need to do from serverside?

Sample Code:

layers: [ new ol.layer.Tile({ source: new ol.source.OSM({ url: 'http://testmap.com/{z}/{x}/{y}.png' }) }),

asked 16 Feb '17, 11:54

Reshma%20Maner's gravatar image

Reshma Maner
accept rate: 0%

I assume that you have properly set up either renderd or tirex. If not, do that first. Then you need to have your ModTile directives in the Apache config set accordingly. If you want tiles to be available under / like in your above example, and if your map style is called "osm", then you'd need

AddTileConfig / osm

Read more here: https://github.com/openstreetmap/mod_tile/blob/master/mod_tile.conf

permanent link

answered 16 Feb '17, 12:08

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 23%

edited 16 Feb '17, 12:08

Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 16 Feb '17, 11:54

question was seen: 2,140 times

last updated: 16 Feb '17, 12:08

powered by OSQA