SMS with google maps link

psekinho7 years ago

I am trying to configure SMS to have a clickable google maps link.
I use as a base http://maps.google.com/?q=[$position.latitude;],[$position.longitude;] format...I change [ ] with () or empty...
I always get this SMS as text like http://maps.google.com/?q=[position.latitude;],[position.longitude;].
I also tried https://www.google.com/maps/search/?api=1&query=$position.latitude,$position.longitude which i saw in a topic for email template but same result.

I checked log and position lat&lon are received ok. For some reason $position.latitude is translated as text.

Is there a way to make it work or i am trying in vain?

Anton Tananaev7 years ago

Which template are you modifying?

psekinho7 years ago

I am doing my test with sms template deviceonline.vm.
I keep it as it is and i am adding what i showed.
$device.name online at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone) https://www.google.com/maps/search/?api=1&query=$position.latitude,$position.longitude
This is how it looks like now

Anton Tananaev7 years ago

Device online doesn't have position object, so what you want to do will never work.

psekinho7 years ago

Aha...Should i try with geofence?

psekinho7 years ago

I used device online because it's easier to make gps send sms this way...so i can test it.

Anton Tananaev7 years ago

I think you should be able to use it with most other events.

psekinho7 years ago

I will give it a try and let you know. Thank you.

vk3vcs4 years ago

Was this ever successful?

davejh4 years ago

Hi. Is there a reason why Device online doesn't have position object, it seems logical to include it.

Anton Tananaev4 years ago

It doesn't have position because it's not related to position. There are cases when there is no position, but device is still online. There are also cases where there are several positions reported at the same time.

Murthy Varanasi4 years ago

Cant we add position in sms notifictaion beacuse they are mnadatory in most of the GPS services

Anton Tananaev4 years ago

You can for most events.

Murthy Varanasi4 years ago

can i have the document link which refers to the variables for notifications

Anton Tananaev4 years ago

We don't have such document. You'll have to look at the source code if you want more details.