Change Map Charts Tile Server
SimonP
Registered Posts: 2 ✭
Hi !
I am using Dataiku on a private network with no Internet access.
I howerver have acces to internal tile serveurs.
Is there any way so i can use them instead of the preconfigured Internet Openstreet Map Server.
Thanks for your help.
Operating system used: Linux
Tagged:
Best Answer
-
JordanB Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 297 Dataiker
Hi @SimonP
,Yes, assuming your tile server follows the Mapnik-style convention. You would need to create a new plugin in the plugin dev tool. https://doc.dataiku.com/dss/latest/plugins/reference/index.htmlIn the plugin, create a "js" folder, and inside, create a .js file (ex: mybackground.js), with the following content:(function() { dkuMapBackgrounds.addCustom({ "id": "my-osm-server", "name": "My OSM Server", "getTileLayer": function () { return new L.tileLayer( 'http://YOUR_SERVER_URL/PREFIX/{z}/{x}/{y}.png', { attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, ©' }) }, "fadeColor": "#333" }) })();
The URL/PREFIX must match so that z is the zoom level and x and y are the tile indexThen refresh the page, and a new background should be available.It is not possible to change the default value.Thanks,Jordan
Answers
-
Thanks a lot @JordanB
!