Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax for cartodb.pattern property setting in config file #15

Open
mskyttner opened this issue Aug 22, 2018 · 1 comment
Open

Syntax for cartodb.pattern property setting in config file #15

mskyttner opened this issue Aug 22, 2018 · 1 comment

Comments

@mskyttner
Copy link

We'd like to make a setting to change the default value of the "cartodb.pattern" URL pattern that is used for the base layers of the front end Google map and we found this indicating that we should be able to set it in a config file:

https://github.com/AtlasOfLivingAustralia/ala-collectory/blob/master/grails-app/conf/Config.groovy#L97

What is the syntax to use to achieve the following string once it hits the javascript:

//cartodb-basemaps-${s}.global.ssl.fastly.net/light_nolabels/${z}/${x}/${y}.png

Ie we remove the http part in the default setting in order to use the default protocol whatever it is and we want to escape the $ (if needed).... Tried a couple of combinations with single quoted strings, no quoting and a slash-dollar style but it seems the dollars get mangled in all these attempts. Is there a groovy syntax for escaping dollar signs we should utilize? Double quoting? Double slashing to have a string literal that retains the dollar signs?

@mskyttner
Copy link
Author

We ended up using this syntax and it seems to work:

cartodb.pattern=//cartodb-basemaps-\$\{s\}.global.ssl.fastly.net/light_nolabels/
\$\{z\}/\$\{x\}/\$\{y\}.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant