From aashish.chaudhary at kitware.com Tue Nov 3 10:25:08 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 3 Nov 2015 10:25:08 -0500 Subject: [Geojs-developers] GeoJS supporting tiles from multiple sub domains In-Reply-To: References: Message-ID: Madhav, I pushed a fix here: https://github.com/OpenGeoscience/geojs/pull/463 You can merge locally in your geojs checkout and then run > grunt --- And this is how you would do it for cartodb tiles. map.createLayer( 'osm', {'tileUrl': 'http://{s}.api.cartocdn.com/base-midnight/ //.png'} ); - Aashish On Tue, Nov 3, 2015 at 8:28 AM, Aashish Chaudhary < aashish.chaudhary at kitware.com> wrote: > Madhav, > > Sorry, the {s} part is not handled right now for parsing. However, it > would be easy to add. I am going to push a a fix for it. > > - Aashish > > On Wed, Oct 28, 2015 at 6:51 PM, Madhav Sharan wrote: > >> HI Aashish, Using tileUrl API I am able to handle "// " part >> but this was also working with "baseUrl". I am trying to focus the {s} part, >> in other map APIs {s} gets replaced with a,b,c etc.. >> >> tileUrl : 'http://{s}.basemaps.cartocdn.com/light_all///.png' >> >> -- >> Thanks >> Madhav Sharan >> >> >> On Wed, Oct 28, 2015 at 6:15 AM, Aashish Chaudhary < >> aashish.chaudhary at kitware.com> wrote: >> >>> 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 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 ', >>>> attributions: [new ol.Attribution({ html: ['© OpenStreetMap contributors, © CartoDB'] })] >>>> }) >>>> }) >>>> >>>> -- >>>> Thanks >>>> Madhav Sharan >>>> >>>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Tue Nov 3 11:31:50 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 3 Nov 2015 11:31:50 -0500 Subject: [Geojs-developers] GeoJS supporting tiles from multiple sub domains In-Reply-To: References: Message-ID: Thanks Madhav. After talking to Jonathan, we decided to follow the convention so now it would be: map.createLayer( 'osm', {'tileUrl': 'http://{s}. api.cartocdn.com/base-midnight/{z}/{x}/{y}.png'} ); On Tue, Nov 3, 2015 at 10:50 AM, Madhav Sharan wrote: > I will try it tonight and let you know how it goes. Thanks again > > - > Madhav > On 3 Nov 2015 07:47, "Aashish Chaudhary" > wrote: > >> Madhav, >> >> I pushed a fix here: https://github.com/OpenGeoscience/geojs/pull/463 >> >> You can merge locally in your geojs checkout and then run >> > grunt >> >> --- >> >> And this is how you would do it for cartodb tiles. >> map.createLayer( >> 'osm', {'tileUrl': 'http://{s}.api.cartocdn.com/base-midnight/ >> //.png'} >> ); >> >> - Aashish >> >> >> On Tue, Nov 3, 2015 at 8:28 AM, Aashish Chaudhary < >> aashish.chaudhary at kitware.com> wrote: >> >>> Madhav, >>> >>> Sorry, the {s} part is not handled right now for parsing. However, it >>> would be easy to add. I am going to push a a fix for it. >>> >>> - Aashish >>> >>> On Wed, Oct 28, 2015 at 6:51 PM, Madhav Sharan wrote: >>> >>>> HI Aashish, Using tileUrl API I am able to handle "// " >>>> part but this was also working with "baseUrl". I am trying to focus the >>>> {s} part, in other map APIs {s} gets replaced with a,b,c etc.. >>>> >>>> tileUrl : 'http://{s}.basemaps.cartocdn.com/light_all/ >>>> //.png' >>>> >>>> -- >>>> Thanks >>>> Madhav Sharan >>>> >>>> >>>> On Wed, Oct 28, 2015 at 6:15 AM, Aashish Chaudhary < >>>> aashish.chaudhary at kitware.com> wrote: >>>> >>>>> 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 >>>>> 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 ', >>>>>> attributions: [new ol.Attribution({ html: ['© OpenStreetMap contributors, © CartoDB'] })] >>>>>> }) >>>>>> }) >>>>>> >>>>>> -- >>>>>> Thanks >>>>>> Madhav Sharan >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> >>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>> * >>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>> * >>>>> >>>> >>>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> >> >> >> -- >> >> >> >> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >> * >> *| http://www.kitware.com/company/team/chaudhary.html >> * >> > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: From aashish.chaudhary at kitware.com Tue Nov 3 12:05:17 2015 From: aashish.chaudhary at kitware.com (Aashish Chaudhary) Date: Tue, 3 Nov 2015 12:05:17 -0500 Subject: [Geojs-developers] GeoJS supporting tiles from multiple sub domains In-Reply-To: References: Message-ID: Sounds great. So if you checkout that branch and use the usual URL it should work. Let us know if you run into issues. On Tue, Nov 3, 2015 at 12:04 PM, Madhav Sharan wrote: > That makes more sense. It is now consistent with other plugins. > > -- > Madhav > On 3 Nov 2015 08:31, "Aashish Chaudhary" > wrote: > > Thanks Madhav. After talking to Jonathan, we decided to follow the > convention so now it would be: > > map.createLayer( > 'osm', {'tileUrl': 'http://{s}. > api.cartocdn.com/base-midnight/{z}/{x}/{y}.png > '} > ); > > On Tue, Nov 3, 2015 at 10:50 AM, Madhav Sharan wrote: > >> I will try it tonight and let you know how it goes. Thanks again >> >> - >> Madhav >> On 3 Nov 2015 07:47, "Aashish Chaudhary" >> wrote: >> >>> Madhav, >>> >>> I pushed a fix here: https://github.com/OpenGeoscience/geojs/pull/463 >>> >>> You can merge locally in your geojs checkout and then run >>> > grunt >>> >>> --- >>> >>> And this is how you would do it for cartodb tiles. >>> map.createLayer( >>> 'osm', {'tileUrl': 'http://{s}.api.cartocdn.com/base-midnight/ >>> //.png'} >>> ); >>> >>> - Aashish >>> >>> >>> On Tue, Nov 3, 2015 at 8:28 AM, Aashish Chaudhary < >>> aashish.chaudhary at kitware.com> wrote: >>> >>>> Madhav, >>>> >>>> Sorry, the {s} part is not handled right now for parsing. However, it >>>> would be easy to add. I am going to push a a fix for it. >>>> >>>> - Aashish >>>> >>>> On Wed, Oct 28, 2015 at 6:51 PM, Madhav Sharan wrote: >>>> >>>>> HI Aashish, Using tileUrl API I am able to handle "// " >>>>> part but this was also working with "baseUrl". I am trying to focus the >>>>> {s} part, in other map APIs {s} gets replaced with a,b,c etc.. >>>>> >>>>> tileUrl : 'http://{s}.basemaps.cartocdn.com/light_all/ >>>>> //.png' >>>>> >>>>> -- >>>>> Thanks >>>>> Madhav Sharan >>>>> >>>>> >>>>> On Wed, Oct 28, 2015 at 6:15 AM, Aashish Chaudhary < >>>>> aashish.chaudhary at kitware.com> wrote: >>>>> >>>>>> 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 >>>>>> 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 ', >>>>>>> attributions: [new ol.Attribution({ html: ['© OpenStreetMap contributors, © CartoDB'] })] >>>>>>> }) >>>>>>> }) >>>>>>> >>>>>>> -- >>>>>>> Thanks >>>>>>> Madhav Sharan >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> >>>>>> >>>>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>>>> * >>>>>> *| http://www.kitware.com/company/team/chaudhary.html >>>>>> * >>>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> >>>> >>>> >>>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>>> * >>>> *| http://www.kitware.com/company/team/chaudhary.html >>>> * >>>> >>> >>> >>> >>> -- >>> >>> >>> >>> *| Aashish Chaudhary | Technical Leader | Kitware Inc. >>> * >>> *| http://www.kitware.com/company/team/chaudhary.html >>> * >>> >> > > > -- > > > > *| Aashish Chaudhary | Technical Leader | Kitware Inc. * > *| http://www.kitware.com/company/team/chaudhary.html > * > > -- *| Aashish Chaudhary | Technical Leader | Kitware Inc. * *| http://www.kitware.com/company/team/chaudhary.html * -------------- next part -------------- An HTML attachment was scrubbed... URL: