Adding a Geoserver Custom Map

Karen Roets2 years ago

Hi All,

I am trying to display my Geoserver map on Traccar (version 5.2) but all I am getting is a white map area.

Firstly, I am not sure where to get the WMS link for my map on Geoserver.
Under Layer Preview in Geoserver I have found the wms link:
http://localhost:8888/geoserver/ramm-live-data/wms?service=WMS&version=1.1.0&request=GetMap&layers=ramm-live-data%3ABinLift&bbox=-180.0%2C-90.0%2C180.0%2C90.0&width=768&height=384&srs=EPSG%3A4326&format=image%2Fpng

And under Tile Layers PreviewI have found the png link:
http://172.16.0.131:8888/geoserver/gwc/demo/ramm-live-data:BinLift?gridSet=EPSG:4326&format=image/png

Both of these links are not working and I have tried restructuring them as shown in previous forums.

Furthermore, I have discovered a 'main.6cd3a572.js.map' file that has the links to each of the maps shows on the Traccar website. However, this file is very difficult to read as there are no structure to the file code.

What am I doing incorrectly or am I looking in the wrong places?

Track-trace2 years ago

Not sure if i can help, but..

You run that Geoserver on a local server within your network right ?

Virtualbox meaby ?
What os do you use for that geoserver server ?

Did you try the above links just in a web browser from your desktop and then point it to the server ip of of you geoserver server ?

If so you should change localhost from that first url to your server ip.

Interested to know how this works. Whats actually the reason you want to run your own geoserver ?

Anton Tananaev2 years ago

We don't support WMS format in the modern app. Only XYZ.

Karen Roets2 years ago

Yes, I run Geoserver on a local server within my network, a virtual machine.

I use windows os.

The weblink does work from my desktop when I change the ip to that of the server.

I want to run my own geoserver to show my custom map as a base layer.

Karen Roets2 years ago

Which versions of Traccar does support WMS?

Is there no other way for me to show my geoserver map in Traccar?

Anton Tananaev2 years ago

I think the legacy web app supports WMS.

Karen Roets2 years ago

Can someone please help me to get the correct wms url from Geoserver?

I have tried the following links on the legacy web app but none of them are working. I keep on getting a white screen. The "ip" is the server ip address:

http://ip::8888/geoserver/gwc/service/tms/1.0.0/ramm-live-data%3ABinLift@EPSG%3A4326@png

http://ip:8888/geoserver/ramm-live-data/wms?service=WMS&version=1.1.0&request=GetMap&layers=ramm-live-data%3ABinLift&bbox=-180.0%2C-90.0%2C180.0%2C90.0&width=768&height=384&srs=EPSG%3A4326&format=image%2Fjpeg

http://ip:8888/geoserver/ramm-live-data/wms?service=WMS&version=1.1.0&request=GetMap&layers=ramm-live-data%3ABinLift&bbox=-180.0%2C-90.0%2C180.0%2C90.0&width=768&height=384&srs=EPSG%3A4326&format=image%2Fpng

Karen Roets2 years ago

Hi All,

I have managed to create the following URL for my map sets that I want to add to Traccar from Geoserver. Here is my map set I want to display in Traccar:

http://172.16.0.131:8888/geoserver/gwc/service/tms/1.0.0/ramm-live-data%3ACapetown@EPSG%3A900913@png/0/0/0.png

But when I create the XYZ url for Traccar then I get a blank/white map:

http://172.16.0.131:8888/geoserver/gwc/service/tms/1.0.0/ramm-live-data:countries@EPSG%3A900913@png/{x}/{-y}/{z}.png

Many other people have used this url format and has success. Any ideas on what is going wrong with mine?

Anton Tananaev2 years ago

This definitely won't work: {-y}

Karen Roets2 years ago

Hi Anton,

It doesn't work if I use {-y} or {y}. For others the "-y" worked so I thought that might be how you need to write it.

But either way, mine does not work.

Anton Tananaev2 years ago

Your URLs don't really work for me, so hard to help like that.

Karen Roets2 years ago

Can I send you an email with images of what my URL's produce?

Anton Tananaev2 years ago

That won't really help much. I need to be able to try it.

Karen Roets2 years ago
Anton Tananaev2 years ago

The work directly in the browser, but they don't work in the app because of the CORS issues.

screenshot