Add Here WeGo URL

This commit is contained in:
Gabriel Augendre 2019-06-09 18:59:39 +02:00
parent ef53f193e2
commit 99b6ccdefc

View file

@ -48,6 +48,13 @@ class RoomDetailView(LoginRequiredMixin, QuickActionsMixin, SessionResetMixin, g
if user_agent.is_mobile: if user_agent.is_mobile:
url = f"waze://?ll={self.object.latitude},{self.object.longitude}&navigate=yes" url = f"waze://?ll={self.object.latitude},{self.object.longitude}&navigate=yes"
name = 'Waze' name = 'Waze'
quick_actions.append({
'url': f"here-location://{self.object.latitude},{self.object.longitude}",
'category': 'info',
'display': 'Here WeGo',
'icon': 'fas fa-location-arrow',
})
else: else:
url = (f"https://www.google.com/maps/place/{self.object.latitude},{self.object.longitude}" url = (f"https://www.google.com/maps/place/{self.object.latitude},{self.object.longitude}"
f"/@{self.object.latitude},{self.object.longitude},18z") f"/@{self.object.latitude},{self.object.longitude},18z")