Embedding Tracker Map in my Website

Peter Box8 years ago

Hello,

my Scenario look like this:

I want to install the tracker server on a vps Server given by a Web Hoster.
My Tracker should send Tracking informations via GPRS protocol to the Tracker server via the suitable IP/Port.
Then I want he Tracking results (the map) embedded in my Website (Wordpress Website) as as special site.
The visitor to my site should not be asked to sign up. Access to the map should be freely accessible.
Is there a way to achieve this goal?

Regards

Peter

Anton Tananaev8 years ago

Yes, you can use readonly user and make it publicly accessible using token. You can use this web app:

https://github.com/tananaev/traccar-web/tree/master/web/simple

kumwe8 years ago

Hello All,

I'm trying to do the same myself, but I don't get how to use readonly user. Thanks for the help!

Anton Tananaev8 years ago

Readonly is a user that can't modify anything in the account. It can only observe his devices.

kumwe8 years ago

Yes, but how do I go about creating this type of user?

huismori8 years ago

You don't need to create user, just put this 2 files on the web and open index.html from web browser...

Anton Tananaev8 years ago

To mark user as readonly you just need to tick the checkbox in the user settings when you create it (as admin).

Christopher8 years ago

How can I only show the devices that are linked to a user? Now it always shows all the devices.

Anton Tananaev8 years ago

Traccar only shows linked devices.

Christopher8 years ago

I made a readonly user and added just a few devices to it. How do I get the script (just the two files right?) to connect to the server and the right user? What settings do I have to change?

Thanks!

Christopher8 years ago

The settings I've tried now connect to the server, but give me all devices all the time.

Anton Tananaev8 years ago

You have to put correct user token into the script.

Christopher8 years ago

I understand that but since this version of the file I don't know where anymore;
https://github.com/tananaev/traccar-web/commit/deee0476d2e5257c57f0ef1642fa379c93d8ba23

Sorry for me not seeing.

Thanks for the help

Anton Tananaev8 years ago

You can still put it in the file, or in the URL.

Christopher8 years ago

It works fine when I use incognito mode or am not logged in to Traccar. When I'm logged in I get an empty map.

Is it possible to make the script so that you can show one device?