POST
|
Thanks for the advice! I did make sure to include 'ProjectNum' in the outfield. When I updated my code with: featureLayer.on('click', function(e){
console.log(e);
console.log(e.graphic.attributes.ProjectNum);
}); I get no response. Nothing in the console. I'll attached my js file to my post. Could there be some interference if I also have a hover function? Like maybe I'm clicking the highlighted graphic instead of the polygon?
... View more
07-25-2018
03:07 PM
|
0
|
2
|
692
|
POST
|
I am building a map that you can hover over and click on. I need to access a feature's project number (ProjectNum) when I click on it, but my click event on the layer doesn't seem to be firing. When I click the map, I get all of the feature layer's project numbers, not the one that I want. I've tried using map.on, on(layer, "click"...), layer.on("click"... How do I retrieve the specific project number of the polygon that I click on? function clickMap(){ layer.on("update-end", function(evt){ console.log(evt); map.on("click", function(e){ console.log(e); console.log("project number: " + layer.graphics[0].attributes.ProjectNum); }); })}
... View more
07-25-2018
01:07 PM
|
0
|
5
|
834
|
POST
|
Hi Robert, ignore my last comment. I got mixed up. It works perfectly. Thank you so much for your time!
... View more
07-25-2018
08:42 AM
|
0
|
0
|
318
|
POST
|
It's supposed to be for the polygon highlighted in gold in the Gulf of Mexico.
... View more
07-24-2018
04:01 PM
|
0
|
2
|
318
|
POST
|
Hi Robert, I'm returning to this part of my code. When I hover over my cards, the pop ups don't appear directly over my polygons so that you know the . It looks like the pop up is trying to appear directly in the middle between the card and the polygon which makes it hard to know which polygon it's referring to. I'm not sure how to adjust this feature. Is there a property that controls where the pop up appears? I'm having trouble finding resources for this particular question for v3.2 Thanks!
... View more
07-24-2018
02:57 PM
|
0
|
4
|
318
|
POST
|
I know the Survey123 Connect Desktop app can split surveys into sections but I'm not (readily) seeing the same capabilities in the web surveys. Thanks!
... View more
05-04-2018
08:40 PM
|
0
|
1
|
429
|
POST
|
I haven't seen any examples of Survey123 being used to crowdsource information from the public. I know you can do this with GeoForms but their survey format seems a little limited. Thanks!
... View more
05-02-2018
04:59 PM
|
0
|
1
|
707
|
POST
|
I had nested it in the updateDefinitionExpression(definitionExpression) function. So when I test alerts outside of array.map I get them when I click my filter button, but nothing happens inside function(gra). Is that what you're talking about? function updateDefinitionExpression(definitionExpression){ //var definitionExpression = "HISAProjects_final_1262017_cs_2 = 'PELAGIC' AND FY = '2010'"; layer.setDefinitionExpression(definitionExpression); console.log(definitionExpression); map.infoWindow.hide(); alert("1"); array.map(layer.graphics, function(gra){ console.log(layer.graphics); alert("2"); var projectNum = gra.attributes.HabitatData12_4_17_ProjectNum; console.log(projectNum); var currentID = $('.clickable').attr('id'); console.log(currentID); if (projectNum != currentID){ currentID.hide(); } else{ alert("all the same"); } }); } //end updateDefinitionExpression function
... View more
04-23-2018
07:49 AM
|
0
|
10
|
2364
|
POST
|
I don't get anything. Nothing logged in the console, no alerts. It's like those lines of code don't exist. But when I use console.log(layer.graphics), I see the array and I can get to where the attributes are.
... View more
04-23-2018
07:10 AM
|
0
|
12
|
2364
|
POST
|
Thank you for these suggestions! They are very helpful
... View more
02-01-2018
09:59 AM
|
1
|
0
|
579
|
POST
|
I want to add a control into the user interface so that people can choose which points get displayed.
... View more
01-26-2018
11:18 AM
|
0
|
2
|
583
|
POST
|
I'm having this problem too. When I tested it out a while ago, the work around I found was to make the web map public, but that's obviously not a good development solution.
... View more
01-25-2018
05:05 PM
|
0
|
0
|
411
|
POST
|
I would like to add a filter widget to the story map tour that updates the contents in the tour dynamically. Is there a way to do this without downloading the source code? I currently don't have access to a local server to deploy a story map so I'm trying to think of other creative ways to achieve this goal. Perhaps there's some functionality to story maps that I haven't found yet! Any ideas would be greatly appreciated!
... View more
01-25-2018
03:26 PM
|
0
|
4
|
1181
|
POST
|
Ian Wittenmyer Thanks! I think that would be helpful. On another note, is there a way to add an "All' category to the filter? I'm not finding any options that would allow me to say, Find locations from all Fiscal Years and Habitat Type is Mangrove (or something like that). Thanks!
... View more
01-25-2018
01:01 PM
|
0
|
2
|
579
|
Title | Kudos | Posted |
---|---|---|
1 | 02-01-2018 09:59 AM | |
1 | 07-30-2017 11:51 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|