Geoserver自定义地图在Traccar上(XYZ地图瓦片)

huangapple go评论73阅读模式
英文:

Geoserver Custom Map on Traccar (XYZ Map Tiles)

问题

我想从geoserver生成地图,用作Traccar的地图。例如,对于地图测试,OSM没有问题,并且如下所示正常显示。

但是,当我使用geoserver创建图层地图,然后尝试在Traccar上显示它时,出现的地图会重复显示,并且不像地图视图那样完整。

我有什么遗漏或者犯了什么错误吗?
请有人帮助我解决这个问题?

如果还有什么我解释不清楚的地方,请告诉我,我将乐意解释这个问题。

英文:

I want to generate map from geoserver to use as map for Traccar. For the map test, for example, OSM has no problems and appears normal as shown below.
Geoserver自定义地图在Traccar上(XYZ地图瓦片)

However, when I create a layer map with the geoserver and then I try to display it on Traccar, the map that appears appears repeatedly and is not as full as the map view.
Geoserver自定义地图在Traccar上(XYZ地图瓦片)

Did I miss something or did I make a mistake?
Please can anyone help me resolve this ?

If there is something that is still lacking from my explanation or something is still not clear, please let me know, I will be happy to explain the problem.

答案1

得分: 0

感谢澄清问题。我已经调查了一下,并找到了解决办法。之前我使用了一个2x1的代码网格集(4326),所以我使用了一个1x1的代码网格集(900913)。我还发现了使用"flipY=true"的用法,这样从上到下剪切的地图位置就正确了。因此之前的URL是:'localhost:8090/geoserver/gwc/service/tms/1.0.0/...{z}/{x}/{y}.png?flipY=true' 变成了:'localhost:8090/geoserver/gwc/service/tms/1.0.0/...{z}/{x}/{y}.png?flipY=true' 现在它起作用了。

英文:

Thanks for clarifying the question. <br> I've looked into it and have found a solution. Previously I used a code gridset (4326) with dimensions of 2x1, so I used a code gridset (900913) with dimensions of 1x1. I also found the use of "flipY=true" so that the position of the map that is clipped from top to bottom is correct. <br>so that the previous url : 'localhost:8090/geoserver/gwc/service/tms/1.0.0/…{z}/{x}/{y}.png?flipY=true'<br> Become : 'localhost:8090/geoserver/gwc/service/tms/1.0.0/…{z}/{x}/{y}.png?flipY=true' <br>
<br>And it works.

huangapple
  • 本文由 发表于 2023年5月29日 14:45:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/76355182.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定