0

How can I use WMS layer of Leaflet with react for this type of logic. Basically I want to update WMS layer with change in parameters.

<MapContainer

 <TileLayer attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
 url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"/>
>
<WMSTileLayer 
           
           url="http://localhost:8080/geoserver/PropsureWndb/wms?"
           version="2.20.1"
           opacity={1}
           transparent
           layers={"PropsureWndb:sqlrouteviews"}
           srs="EPSG:4326"
           viewparams= {`lat:${lat};long:${long};lat1:${lat1};long1:${long1}`}
           format="image/png"
          />
</MapContainer>

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.