Can't build Map.ts with L
Closed this issue · 1 comments
mateuswetah commented
Hi there!
I'm sorry if it's a simple mistake, I'm pretty new on Ionic2. I'm trying to follow your steps on Readme, but it still not working...
First, I had to do npm install leaflet
, hope that's the correct package.
Secondly, I couldn't find any difference in your declarations.d.ts
file from the one I generated with CLI, so it still only has declare module '*';
inside it.
In my Map.ts
I have import L from "leaflet";
which seems to work fine, but I have errors in:
map: L.Map;
center: L.PointTuple;
The message is the following:
[12:36:21] typescript: src/pages/map/map.ts, line: 17
Namespace ''*'' has no exported member 'Map'.
L16: export class MapPage {
L17: map: L.Map;
L18: center: L.PointTuple;
[12:36:21] typescript: src/pages/map/map.ts, line: 18
Namespace ''*'' has no exported member 'PointTuple'.
L17: map: L.Map;
L18: center: L.PointTuple;
Am I supposed to do anything else?
mateuswetah commented
So I actually solved it by using just import "leaflet";
... Anyways, thanks for the sample ;)