当前位置:网站首页>Geoserver + mysql + openlayers problem
Geoserver + mysql + openlayers problem
2022-08-02 22:03:00 【Jennifer33K】
1. tomcat下部署geoserver解决跨域访问问题
报错:Access to XMLHttpRequest at 'http://localhost:8900/geoserver/cite/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=cite%3Apoi&maxFeatures=50&outputFormat=application%2Fjson' from origin 'http://localhost:8090' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
2. win10 处理shp数据进入mysql(报错cygwin1.dll丢失)
3. wfs要素url:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"id": "points.1",
"geometry": {
"type": "Point",
"coordinates": [
116.311,
40.014
]
},
"geometry_name": "location",
"properties": {
"name": "圆明园",
"x": "116.310558",
"y": "40.014033"
}
},
{
"type": "Feature",
"id": "points.2",
"geometry": {
"type": "Point",
"coordinates": [
116.335,
40.0105
]
},
"geometry_name": "location",
"properties": {
"name": "清华大学",
"x": "116.335279",
"y": "40.010497"
}
},
{
"type": "Feature",
"id": "points.3",
"geometry": {
"type": "Point",
"coordinates": [
116.278,
40.0065
]
},
"geometry_name": "location",
"properties": {
"name": "颐和园",
"x": "116.277787",
"y": "116.277787"
}
},
{
"type": "Feature",
"id": "points.4",
"geometry": {
"type": "Point",
"coordinates": [
116.405,
39.9154
]
},
"geometry_name": "location",
"properties": {
"name": "天安门",
"x": "116.404844",
"y": "39.915378"
}
},
{
"type": "Feature",
"id": "points.5",
"geometry": {
"type": "Point",
"coordinates": [
116.434,
39.9101
]
},
"geometry_name": "location",
"properties": {
"name": "北京站",
"x": "116.434164",
"y": "39.910065"
}
},
{
"type": "Feature",
"id": "points.6",
"geometry": {
"type": "Point",
"coordinates": [
116.225,
39.8565
]
},
"geometry_name": "location",
"properties": {
"name": "卢沟桥",
"x": "116.224895",
"y": "39.85647"
}
},
{
"type": "Feature",
"id": "points.7",
"geometry": {
"type": "Point",
"coordinates": [
116.327,
39.9025
]
},
"geometry_name": "location",
"properties": {
"name": "北京西站",
"x": "116.32723",
"y": "39.901652"
}
},
{
"type": "Feature",
"id": "points.8",
"geometry": {
"type": "Point",
"coordinates": [
116.612,
39.9025
]
},
"geometry_name": "location",
"properties": {
"name": "北京首都国际机场",
"x": "116.612388",
"y": "40.085613"
}
}
],
"totalFeatures": 8,
"numberMatched": 8,
"numberReturned": 8,
"timeStamp": "2022-07-27T15:18:10.256Z",
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:EPSG::4326"
}
}
}
4.效果
问题参考:
1. The diagram willshape file导入MySQL数据库中 - 知乎 (zhihu.com)
2. 将shp文件导入到mysql数据库中 - whh - 博客园 (cnblogs.com)
3. geoserver跨域问题解决 - 陈先生86 - 博客园 (cnblogs.com)
4. GeoServer 2.15.2Version cross-domain problem solution - 昜木辰deブログ - 博客园 (cnblogs.com)
边栏推荐
- 日常开发中,String类中常用的方法
- 指针常量和常量指针概述
- 元宇宙001 | 情绪无法自控?元宇宙助你一臂之力
- Detailed explanation of AtomicInteger
- 基于OpenGL的冰川与火鸟(光照计算模型、视景体、粒子系统)
- 就刚刚,鸿蒙3.0发布了,华为还一口气发布了十一款产品
- 什么是现场服务管理系统(FSM)?有什么好处?
- 竞赛:糖尿病遗传风险检测挑战赛(科大讯飞)
- Why young people are snapping up domestic iPhone, because it is much cheaper and more populist
- 知识点滴 - 什么是iAP2 (上)
猜你喜欢
音频隐写一
selenium安装和环境配置Firefox
What skills are the most practical for college students in communications?
快速掌握jmeter(一)——实现自动登录与动态变量
Boyun Selected as Gartner China DevOps Representative Vendor
Functional test points for time, here is a comprehensive summary for you
Mppt光伏最大功率点跟踪控制matlab仿真
线程池原理与实践|从入门到放弃,深度解析
WIFi 开关控制实现-ESP8266 物联网 android studio arduino QT多线程服务器
MySQL主从搭建(问题大聚集,告别部署烦恼)
随机推荐
EasyCVR平台通过国标GB28181接入柯达NVR显示注册失败,该如何解决?
Boyun Selected as Gartner China DevOps Representative Vendor
3年半测试经验,20K我都没有,看来是时候跳槽了
SQL Alias 别名
指针常量和常量指针概述
互联网寒冬,挚友7面阿里,终获Offer
香农与信息论三大定律
博云入选 Gartner 中国 DevOps 代表厂商
selenium安装和环境配置Firefox
Mobile Banking Experience Test: How to Get the Real User Experience
十六进制文本的字节序问题
SQL Alias Aliases
情景剧《重走长征路》上演
有什么好用的IT资产管理软件
动态规划常见实例详解
SQL server有什么认证吗?
视频隐写一
register和volatile的区别
仿制药的未来商机--个人研发的体会
元宇宙001 | 情绪无法自控?元宇宙助你一臂之力