TransWikia.com

Hyperlink in ArcGIS JavaScript API map identify dialog?

Geographic Information Systems Asked on July 27, 2021

IBM’s Maximo Spatial 7.6.1 uses the ArcGIS JavaScript API/map service to serve up a web map to Maximo:

enter image description here

In the Maximo map, I’ve included URLs as values in the GIS layer.

I want to be able to use the URLs as hyperlinks in Maximo that would open in a new tab/window in the browser.

Is there something I can do on the GIS side so that the URLs are treated as hyperlinks?

2 Answers

If you're using only the ESRI Javascript API and pure javascript to construct your infobox, you'll need to code some html for that field in the content of the infobox's template.
for instance: "DESCRIPTION: http://mylink> Link "

If you're using an ArcGISONline or Portal webmap to configure your popup, then it should detect the http and make a link automatically, but it doesnt look like you are using that here...

Correct answer by ericoneal on July 27, 2021

As @ericoneal mentioned, the solution was to use HTML in the URL.

  • The webpage opens in a new tab in Google Chrome (which is good). Chrome Version 79.0.3945.130 (Official Build) (64-bit)

<a href='http://maps.google.com/maps?q=&layer=c&cbll=43.000000,-78.000000'> Link </a>

enter image description here


The SQL behind this is:

'<a href=''http://maps.google.com/maps?q=' ||chr(38)|| 'layer=c' ||chr(38)|| 
    'cbll=43.000000,-78.000000''> Link </a>' as description,

Hint:

In Toad, the ampersand was being interpreted as a variable. I had to escape/replace the ampersand with ||chr(38)||. Escaping ampersand character in SQL string

Answered by User1973 on July 27, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP