You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
478 B
15 lines
478 B
module MapsApiHelper
|
|
def maps_api_template(privacy = 'private')
|
|
maps_api_url('{user}', privacy)
|
|
end
|
|
|
|
def maps_api_url(username, privacy = "private")
|
|
maps_api = Cartodb.get_config(:tiler, privacy)
|
|
if CartoDB.subdomainless_urls?
|
|
maps_api["protocol"] + "://" + maps_api["domain"] + ":" + maps_api["port"].to_s + "/user/#{username}"
|
|
else
|
|
maps_api["protocol"] + "://#{username}." + maps_api["domain"] + ":" + maps_api["port"].to_s
|
|
end
|
|
end
|
|
end
|