iovmap
Version:
a map sdk base on leaflet
58 lines (40 loc) • 1.37 kB
HTML
<html lang="en">
<head>
<base target="_top">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>WMS example - Leaflet</title>
<link rel="shortcut icon" type="image/x-icon" href="docs/images/favicon.ico" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin="" />
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script>
<style>
html,
body {
height: 100%;
margin: 0;
}
.leaflet-container {
height: 400px;
width: 600px;
max-width: 100%;
max-height: 100%;
}
</style>
</head>
<body>
<div id='map'></div>
<script type="text/javascript">
const map = L.map('map', {
center: [0, 0],
zoom: 1,
crs: L.CRS.EPSG4326
});
const wmsLayer = L.tileLayer.wms('http://1.94.59.176:18080/geoserver/china/wms?', {
layers: 'china:gis_osm_places_a_free_1 '
}).addTo(map);
</script>
</body>
</html>