Hello..
I have black dots i.e (Assets) in Map page and each asset has different Asset ID.
My requirement is when i select the PIN in the map, the respective asset id's in map should get highlighted with any color.
My Problem is I am unable to read/identify the asset based on the selection.Therefore i am unable to highlight any color on the same.
I have tried a lot but not get success.
Any help is appreciated.
Thanks in advance.
Can you post the code of what you've tried so far?
What are the objects in "data" that are getting returned by the ajax query? Are they features or something else? If they are features, normally you would find the attributes by
assetid = data[i].attributes.AssetID
You should use the debugger tools in your browser to examine the "data" object to determine where the attributes are stored.
What are the AssetIDs? You're trying to create graphics from the splitassetsids, but creating graphics requires either a geometry or a JSON object. You're then trying to add splitassetsids to the map directly, not the graphics you tried to create.
Finally, you're mixing up using AMD and legacy-style coding.
var sls = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color(markerHighlightColor), 4);
var polyGraphic = new esri.Graphic(splitassetids, symbol);
You should use just AMD style.
Please just write your comments in this thread, not in a separate document attachment.
How are the black dots added to the map? Are they a separate feature layer or just graphics? It's difficult to diagnose without seeing more of your code
Hi,
Sorry for the delayed response.
As per current update, i am now able to highlight the assets on pin click.
But now, the problem is highlight part is working only after doing zoom in
or zoom out in map.
I mean, when i am selecting any PIN then after doing zoom in or zoom out
the color is highlighting on the assets.
Is there any workaround, where i can click on PIN and highlight the asset
color without zoom in or zoom out.
Awaiting for your reply.
Thanks in advance.
HI ,
Hope you are doing well.
Any workaround for my previous issue.?
Awaiting for your reply.
On Thu, Jun 7, 2018 at 1:45 PM, JustLikeThat GK <krishnadew06@gmail.com>
What is your code?