【发布时间】:2017-02-18 12:27:55
【问题描述】:
我需要在传单上使用我的 WMS 并将其显示在 Web 视图中。当我在broser中打开我的传单应用程序时,它非常纯净且可读。当相同的代码在 android 中运行时,它的可读性要差得多。我已经尝试将detectRetina: true 添加到 wms 层,但文本非常小,而且现在可读性最差。在图片上你可以看到不同的地方。
这是我的完整代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>LEaflet</title>
<link rel="stylesheet" href="leaflet/leaflet.css">
<link rel="stylesheet" href="style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
</head>
<body style="padding:0; margin:0; height: 100vh; width: 100vw;">
<div id="map" style="height: 100vh; width: 100vw;"></div>
</body>
<script src="leaflet/leaflet.js"></script>
<script>
var map = L.map('map', {
minzoom:13
}).fitWorld();
var wmsLayer = L.tileLayer.wms('http://10.0.2.2:8080/geoserver/TEST/wms?', {
layers: 'TEST:MyBaseLayer'
//detectRetina: true
}).addTo(map);
</script>
</html>
【问题讨论】:
标签: android leaflet geoserver wms