Hi,
I built a model-driven app, in which i have a custom entity, which includes the address latitude and longitude, then i wanted to show this on an integrated google map (html web resource), and added a marker and the directions url to this marker so when the user clicks on the marker it would open google maps app (on the phone).
so my code is working and i am able to open google maps when i click on the marker if i am using a browser, but when i am using the Dynamics 365 mobile app, the click does not work!
so is this some kind of a bug or restriction? i hope someone would answer it.
so here is my java script code to check it.
function initialize() { 'use strict'; var map_canvas = document.getElementById('map_canvas'); var map_options = { center: new google.maps.LatLng(33.3116075, 44.2158218), zoom: 6, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(map_canvas, map_options); var geocoder = new google.maps.Geocoder(); var lat = window.parent.Xrm.Page.data.entity.attributes.get('drm1_addresslatitude').getValue(); var lon = window.parent.Xrm.Page.data.entity.attributes.get('drm1_addresslongitude').getValue(); var address = lat "," lon; geocoder.geocode({ 'address': address }, function (results, status) { if (status === google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); map.setZoom(14); var marker = new google.maps.Marker({ map: map, position: results[0].geometry.location, url: "https://www.google.com/maps/dir/?api=1&destination=" results[0].geometry.location }); /*var infoWin = new google.maps.InfoWindow(); google.maps.event.addListener(marker, 'click', function () { infoWin.setContent(marker.url), infoWin.open(map, marker); });*/ google.maps.event.addListener(marker, 'click', function () { window.open(marker.url); }); } else { //alert("Geocode was not successful for the following reason: " status); } }); } google.maps.event.addDomListener(window, 'load', initialize);