Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integration with angular-cli #14

Open
curvenut opened this issue Jun 28, 2017 · 1 comment
Open

integration with angular-cli #14

curvenut opened this issue Jun 28, 2017 · 1 comment

Comments

@curvenut
Copy link

curvenut commented Jun 28, 2017

Hi,

I am trying to use it with an angular-cli project.
I manage to import the javascript file with the instruction in my typescript source :

 import * as wmts  from 'assets/LeafletWMTS';

But then I got an error when creating the wmts tilelayer

L.tileLayer.wmts(urlTemplate, options)

give and error wmts does not exist in type "typeof tileLayer"

Thanks for help

@alexandre-melard
Copy link
Owner

you don't need that plugin anymore, exemple with angular-cli:
use ngx-leaflet and the code below:

  ignMap = L.tileLayer('https://wxs.ign.fr/' +
    'your key' + '/geoportail/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=' +
    'GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN25TOUR' + '&STYLE=normal&TILEMATRIXSET=PM&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&FORMAT=image%2Fjpeg',
    { opacity: 0.5 });

  options = {
    layers: [
      this.ignMap
    ],
    zoom: 15,
    center: L.latLng([45.419364, 5.347022])
  };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants