CartoDB / CartoDB-basemaps

CartoDB basemaps
http://cartodb.com/basemaps
Other
55 stars 13 forks source link

Minor issue in example for integrating catodb base map with openlayers on https://cartodb.com/basemaps/ #65

Closed smadha closed 8 years ago

smadha commented 8 years ago

I was following example for integrating catodb base map with openlayers on https://cartodb.com/basemaps/ . As per example subdomain template is {s} and url needs to be specified as -

url: 'http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png'

But as per openlayers 3 docs http://openlayers.org/en/v3.8.2/apidoc/ol.source.XYZ.html

URL template. Must include {x}, {y} or {-y}, and {z} placeholders. A {?-?} template pattern, for example subdomain {a-f} .domain.com, may be used instead of defining each one separately in the urls option.

I have tested and provided example does not works. Example needs to be changed to something like -

url: 'http://{a-c}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png'

pnorman commented 8 years ago

Fixed in the docs - there's no commit to point to in this repo since the website is coming from another repo.