Open rowheat02 opened 5 years ago
The way we did this in our react application is by doing npm install of the library and importing it as such:
import LeafletWms from "leaflet.wms";
Now we can use it by doing
const layerSource = LeafletWms.source(
"URL",
{}
);
layerSource.getLayer("LAYER_NAME").addTo(map)
The way we did this in our react application is by doing npm install of the library and importing it as such:
import LeafletWms from "leaflet.wms";
Now we can use it by doing
const layerSource = LeafletWms.source( "URL", {} ); layerSource.getLayer("LAYER_NAME").addTo(map)
The above also works for vue.
Don't know how to import L.WMS in React. I am new to this React and leaflet.
Here is the code: