Show Google Maps Link

BerndFfm 5 years ago

I have a small hint for the community :

I wanted to show a google maps link and a open street map link in the attributes so I can copy them to email or messenger.

I made it this way :

Add <entry key='processing.computedAttributes.deviceAttributes'>true</entry> to the traccar.xml.

Add this 2 computed attributes :

Google Maps
Google Maps
"www.google.com/maps/place/" + latitude + "," + longitude
Text

Open Street Map
Open Street Map
"www.openstreetmap.org/?mlat=" + latitude + "&mlon=" + longitude
Text

All devices : check the computed attributes.

Now I get the following attributes for every device :

Google Maps : www.google.com/maps/place/50.131753,8.8609213

Open Street Map : www.openstreetmap.org/?mlat=50.131753&mlon=8.8609213

Very useful for me !

Idea for the next traccar version : mark a value as link.

Greetings Bernd

Sean macon 5 years ago

BerndFfm does this bring up a hyper-link that you can click on? as I tried this and not working - Any help be great

Thanks

Sean macon 5 years ago

If I cut paste, It works, anyway to have a simple click of the address and opens new window?

BerndFfm 5 years ago

Hyperklink to click on is not possible now.

Maybe in 4.14 ?

You have to copy and paste the link.

#Bernd

Sean macon 5 years ago

yes see that, I have bit code that I try to find, that adds a GOOGLE bubble top left - screen, and if you click on it, opens google maps in another screen, I can share if any use,

David 5 years ago

Podrias dar mas detalles paso a paso como hacerlo? no logro poder agregar atributo calculados

Sean macon 5 years ago

Podrias dar mas detalles paso a paso como hacerlo? no logro poder agregar atributo calculados ENGLISH please?

BerndFfm 5 years ago

atributos calculados :

clic en el engranaje en la parte superior derecha, atributos calculados, [+]

Complete los 4 ... como yo escribe arriba, luego clic el [OK]

David 5 years ago

Podrias Completarlo por favor ? :

Descripcion

Atributo

Expresion

Tipo

BerndFfm 5 years ago
Descripcion : Google Maps
Atributo : Google Maps
Expresion : "www.google.com/maps/place/" + latitude + "," + longitude
Tipo : Text

Descripcion : Open Street Map
Atributo : Open Street Map
Expresion : "www.openstreetmap.org/?mlat=" + latitude + "&mlon=" + longitude
Tipo : Text

Computed Attributes

David 5 years ago

Pero en que version de Traccar? no me figura esas opcion TEXT

Sean macon 5 years ago

I also Cant see TXT only see - String - Number - Booleon - Cant edit or ADD TEXT

BerndFfm 5 years ago

Version 4.12 German. In english it is "String".

Sean macon 5 years ago

YES we use string and works, as it gives lat long - buy like to CLICK to open maps - rather than Cut and paste

David 5 years ago

Ha ok, aun no tengo esa version entonces, podrias subir una imagen de como quedarian los correos con el atributo?

me parece una buena idea