Google Maps/OSM link work fine on a V4.14 server ... maybe you can create a link button right away?
Another request on the topic, can you please take a look at https://www.traccar.org/forums/reply/65274/ - I would need some help there ?!
(if possible in German)
Greetings
Token
You don't have to pick from the list. You can type your own name.
Truth! I didn't realize I could type. Thanks.
Has anyone created a quick link?
Hi.
Continuing with the initial configuration (Compute Attribute: Google Maps), I added a javascript rule to show Google Link in app.min.js
if(record.get('name')==='GoogleMaps'&&(!value===fasle))return'\x3ca target\x3d"_blank" href\x3d"'+value+'" \x3e'+'Ver en Google'+'\x3c/a\x3e';
It's work!!!
to ubicate where exactly you need to put this code, first search 'stategeocode' word.
here the complete function reference:
function(value,metaData,record){if('alarm'===record.get('attribute'))metaData.tdCls='view-color-red';else{if(record.get('name')==='GoogleMaps'&&(!value===fasle))return'\x3ca target\x3d"_blank" href\x3d"'+value+'" \x3e'+'Ver en Google'+'\x3c/a\x3e';if(record.get('name')===Strings.positionAddress&&!value)return'\x3ca href\x3d"#" onclick\x3d"Ext.fireEvent(\'stategeocode\')" \x3e'+Strings.sharedShowAddress+'\x3c/a\x3e';if(record.get('name')===Strings.positionImage||record.get('name')===Strings.positionAudio)if(metaData=this.getController().position)if(metaData=
Ext.getStore('Devices').getById(metaData.get('deviceId')))return'\x3ca target\x3d"_blank" href\x3d"/api/media/'+metaData.get('uniqueId')+'/'+value+'" \x3e'+value+'\x3c/a\x3e'}return value}
Hi Mike Mex.
Could you post a print of the final result?
Is it necessary to recompile Traccar for it to work?
Thanks
Is this still working? I made the changes but the attributes are not showed in the status dashboard
Forgot my last comment, I had the computed attribute disabled for the device
https://www.traccar.org/forums/topic/show-google-maps-link/page/3/#post-69620
@Mike Mex can you please confirm that your method enables hyperlink in computed attributes because I've tried your instruction and it doesn't work.
or
Greetings Bernd