Here Maps configuration with ui-leaflet

590 views Asked by At

I am trying to setup Here Maps using ui-leaflet and ui-leaflet-layers. Here is how I wrote the layer. The map container is loaded but there no map. Can you please help with this? Thanks.

layers: {
    baselayers: {
        hereMapsLayer: {
            name: 'Sample',
            type: 'here',
            layerOptions: {
                id: "hereId",
                code: "hereCode"
            }
        }
    },
    overlays: {}
}
1

There are 1 answers

0
Arix OWAYE On BEST ANSWER

Here is what worked for me:

layers: {
  baselayers: {
    hereMapsLayer: {
      name: 'Map name',
      type: 'xyz',
      url: 'http://{s}.{base}.maps.cit.api.here.com/maptile/2.1/{type}/{mapID}/{scheme}/{z}/{x}/{y}/{size}/{format}?app_id={app_id}&app_code={app_code}&lg={language}',
      layerOptions: {
        attribution: 'Map &copy; 2016 <a href="http://developer.here.com">HERE</a>',
        subdomains: '1234',
        base: 'base',
        type: 'blinetile',
        scheme: 'pedestrian.day',
        app_id: 'app_id',
        app_code: 'app_code',
        mapID: 'newest',
        maxZoom: 20,
        language: 'eng',
        format: 'png8',
        size: '256'
      }
    }
  }
}

This link from Here.com helped me resolve this problem: https://developer.here.com/news/201602172

Do not forget to remove "cit" from your url when you are ready to go live.