Skip to content

WMS with Leaflet #74

Description

@ezizrehimov

Hi. do you can help me? i have wms map url and layers. but i did not can use this with leaflet.
can you share with me any sample?

For charts output tests can use WMS endpoint:
http://gis.marine-vts.site/geoserver/wms?version=1.1.0

Here is the layers list for the place:
s57_7A100
s57_7A200
s57_7A300
s57_7A400
s57_7A402
s57_7A502
s57_7A602
s57_7A623

i tryed this :

<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"/>
    <script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
    <style>
        #map {
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
        }
    </style>
    <meta charset="utf-8">
    <title></title>
</head>
<body>
<div id="map"></div>
<script>
    var map = L.map('map').setView([55.67, 12.60], 11);

    var mywms = L.tileLayer.wms("http://gis.marine-vts.site/geoserver/wms?version=1.1.0", {
        layers: 's57_7A100',
        format: 'image/png',
        transparent: true,
        version: '1.1.0',
        attribution: "myattribution"
    });

    mywms.addTo(map);

</script>
</body>
</html>

Can you help me? how i use this wms map with leaflet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions