一、使用openlayers发布geoserver图层,geoserver数据源是mysql,并显示mysql数据的详细信息
Openlayers官网实例:
官网地址: https://openlayers.org/en/v4.6.5/examples/index.html
二、引入ol.css文件,ol.js文件,下载地址:https://openlayers.org/download/
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="ol.css" charset="utf-8" type="text/css">
<style>
.map {
height: 768;
width: 330;
}
</style>
<script src="ol.js" type="text/javascript" charset="utf-8"></script>
<title>OpenLayers example</title