[Geojs-users] GeoJS supporting tiles from multiple sub domains
Aashish Chaudhary
aashish.chaudhary at kitware.com
Wed Oct 28 09:15:07 EDT 2015
There is. Please have a look at
https://github.com/OpenGeoscience/geojs/blob/master/src/core/osmLayer.js
line 167 (tileUrl) API.
Let me know how it goes.
- Aashish
On Wed, Oct 28, 2015 at 5:04 AM, Madhav Sharan <msharan at usc.edu> wrote:
> Hi Dan/Aashish,
>
> I was trying different base maps for GeoParser and most of the tile layers
> I came across support multiple subdomains. I tried using {s} notation in
> GeoJS too but that didn't worked out so I hardcoded it to one of the
> domains. Just curious if there is an alternative to achieve it?
>
> http://a.basemaps.cartocdn.com/light_all
>
> From https://cartodb.com/basemaps/ :
>
> new ol.layer.Tile({
> source: new ol.source.XYZ({
> url: 'http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png <http://basemaps.cartocdn.com/light_all/%7Bz%7D/%7Bx%7D/%7By%7D.png>',
> attributions: [new ol.Attribution({ html: ['© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>'] })]
> })
> })
>
> --
> Thanks
> Madhav Sharan
>
>
--
*| Aashish Chaudhary | Technical Leader | Kitware Inc. *
*| http://www.kitware.com/company/team/chaudhary.html
<http://www.kitware.com/company/team/chaudhary.html>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/geojs-users/attachments/20151028/43582270/attachment.html>
More information about the Geojs-users
mailing list