-
Notifications
You must be signed in to change notification settings - Fork 45
Description
I try to use it in .js component code with react as following:
import React from 'react'
import * as WE from 'webglearth2-offline-gh-pages/v2';
class FlightInfo extends React.Component {
componentDidMount() {
this.initMap();
}
initMap() {
// Offline tiles
this.map = new WE.map('map');
this.map.setView([46.8011, 8.2266], 2);
WE.tileLayer('{z}/{x}/{y}.jpg', {
tileSize: 256,
bounds: [[-85, -180], [85, 180]],
minZoom: 0,
maxZoom: 16,
attribution: 'WebGLEarth example',
tms: true
}).addTo(this.map);
}
render() {
return(
)
When I am trying to run with CALL npm run dev I am receiving module not found error:
./src/components/flightInfo/FlightInfo.js
Module not found: Can't resolve 'webglearth2-offline-gh-pages/v2' in 'C:\heli-2020\tstWacs3Dbrancht\src\components\flightInfo'
Is there a way to resolve this error?