display value from url

346
6
01-24-2018 06:36 AM
Joseph_IrwinGunasekaran1
New Contributor II

Hi I would like to display an URL value (field) while move around feature in webpp builder

0 Kudos
6 Replies
Juan_ManuelAngel
New Contributor III

Do you want to get a value from the url and apply to a web app builder?, do you have some example of what do you want to do ?

0 Kudos
Joseph_IrwinGunasekaran1
New Contributor II

Thank you

0 Kudos
Joseph_IrwinGunasekaran1
New Contributor II

Yes , I have a weather station features with their url with realtime values.I have created a feature service for the layer. When I publish this , I want the users can view the real-time values from the url while they moving their cursors on the map.

0 Kudos
Juan_ManuelAngel
New Contributor III

Look this example with the pointer Event, i think you can get that url value in JavaScript and then add the value from the url to the PopUp in the Right Corner.

Code to get the value from url:

var uri = window.location.href;
var query = uri.substring(uri.indexOf("?") + 1, uri.length);
var queryObject = ioQuery.queryToObject(query);

JavaScript Event Pointer Example

Access features with pointer events | ArcGIS API for JavaScript 4.6 

0 Kudos
Joseph_IrwinGunasekaran1
New Contributor II

Hi Juan,

Thank you, That's exactly that I want. Thank you . Can I Use an XML as a source of value?

0 Kudos
Juan_ManuelAngel
New Contributor III

Yeah you cant get XML Data this example can help you too !

Access data (XML) | ArcGIS API for JavaScript 3.23 

0 Kudos