How activate href link in ArcGIS API?

المشرف العام

Administrator
طاقم الإدارة
I have some problems with opening a link in ArcGIS API. I have my popup window where LAT, LONG and LINK are shown.

function addPoint(evt) { var latitude = evt.mapPoint.getLatitude(); var longitude = evt.mapPoint.getLongitude(); var link = "Google"; map.infoWindow.setTitle("Coordinates"); map.infoWindow.setContent( "lat: " + latitude.toFixed(7) + "
lon: " + longitude.toFixed(7) + "
Room: " + link ); map.infoWindow.show(evt.mapPoint, map.getInfoWindowAnchor(evt.screenPoint));}Here is the image
However when I click on the link nothing happens (no redirection or opening in new window).I tried to add window.open() to open the link,

var link = "Google Office"; on(link, 'click', openLink); function openLink(){ window.open("http://www.google.com"); }but then I get the error message

Uncaught Error: Target must be an event emitter


أكثر...
 
أعلى