I'm trying to create a runtime visualization on a local instance of CartoDB. Here's the relevant code:
cartodb.createLayer(map, {
user_name: 'testuser2',
type:'cartodb',
tiler_host:'', //??
tiler_port: '', //??
tiler_protocol: '', //??
sublayers: [{
sql: "SELECT * FROM metro_stop AS pop",
cartocss: "#pop {marker-fill: #0fb16a; marker-width: 10;}"
}]
}, {no_cdn: true}).addTo(map);
The problem is, I don't know the values of the three missing parameters: tiler_host, tiler_port, and tiler_protocol. Does anyone know how I would find those out?
Edit to add: Here's the error I'm receiving when I set tiler_host to 'localhost.lan', tiler_port to '8181', and tiler_protocol to 'http':
http://testuser2.cartodb.com:8181/api/v1/map?config=%7B%22version%22%3A%221.0.0%22%2C%22stat_tag%22%3A%22API%22%2C%22layers%22%3A%5B%7B%22type%22%3A%22cartodb%22%2C%22options%22%3A%7B%22sql%22%3A%22SELECT%20*%20FROM%20metro_stop%20AS%20pop%22%2C%22cartocss%22%3A%22%23pop%20%7Bmarker-fill%3A%20%230fb16a%3B%20marker-width%3A%2010%3B%7D%22%2C%22cartocss_version%22%3A%222.1.0%22%7D%7D%5D%7D&callback=jQuery17209372722392436117_1401785836614&_=1401785836710 Failed to load resource: Could not connect to the server.
For whatever reason, this is pointing to CartoDB.com to try to get the info.
-
is something running on testuser2.cartodb.com:8181 ?javisantana– javisantana2014年06月03日 15:32:36 +00:00Commented Jun 3, 2014 at 15:32
1 Answer 1
I'm not sure why this works, but I found an answer:
Instead of 'tiler_host', I used tiler_domain:'localhost.lan'
(I also used tiler_port:8181 and tiler_protocol: 'http')
I'm not 100% sure why this works, but it does.