var rawAttrList = globals.map.infoWindow._contentPane.innerHTML.split("<br>"); for (var i = 0; i < rawAttrList.length; i++) { if (rawAttrList.split(" = ")[0] == "ID") { ID = rawAttrList.split(" = ")[1]; } }
I have some point data in csv format with x, y and list of attributes and I use a GraphicsLayer to plot them on a basemap. (Similar to ESRI's example on "Map with CSV data", http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/ags_MapwithTable.html ) A popup window is added when a point is clicked. Things work fine until I need to create a dynamic link on the popup window to retrieve more data: here I need to use a field, e.g., ID, in the attributes. Below is a walk-around I'm using which I don't like and I'm wondering what's right way to handle it. Thanks in advance for any suggestion you might provide. var rawAttrList = globals.map.infoWindow._contentPane.innerHTML.split("<br>"); for (var i = 0; i < rawAttrList.length; i++) { if (rawAttrList.split(" = ")[0] == "ID") { ID = rawAttrList.split(" = ")[1]; } }
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.