yagajs / leaflet-ng2

Angular.io integration of Leaflet
https://leaflet-ng2.yagajs.org
ISC License
66 stars 26 forks source link

TileLayer Subdomains: first tile is wrong #415

Closed jochenjonc closed 5 years ago

jochenjonc commented 5 years ago

Hi,

I'm using Yaga in combination with HERE map tiles, but the first tile that get's fetched is on an unknown subdomain, resulting in a gray square on the map.

This is my code:

<yaga-tile-layer yaga-base-layer="HERE" [(url)]="hereLayerUrl" [subdomains]="hereSubdomains"></yaga-tile-layer>

  public hereLayerUrl = `https://{s}.base.maps.cit.api.here.com/maptile/2.1/maptile/newest/normal.day/{z}/{x}/{y}/256/png8?app_id=${environment.here.app_id}&app_code=${environment.here.app_code}&lg=eng`;
  public hereSubdomains: string[] = ['1', '2', '3', '4'];

But the first tile that gets fetched has the following url: https://**c**.base.maps.cit.api.here.com/maptile/2.1/maptile/newest/normal.day/10/521/342/256/png8?app_id=xyz&app_code=xyz&lg=eng

It calls subdomain c instead of 1 to 4.

Is this a bug or is something misconfigured on my end?

Regards,

Jochen

atd-schubert commented 5 years ago

This seems to be easy to fix. I will give it a try later.