|
POST
|
Thanks, Ken. I haven't looked into that method before. It seemed a little confusing at first but I think I know how I might implement it. I'm using a "control key + click" event in order to bring up the attributeInspector so I'm thinking I could also just pause the click event listener at that time and then resume it when the attributeInspector is dismissed. We'll see how that goes. Thanks for the tip! Steve
... View more
07-27-2016
12:59 PM
|
0
|
0
|
2912
|
|
POST
|
I'm having a little trouble with the double click event and infoWindows. My featureLayer has a popup associated with it which displays when features are single clicked. I want to implement a double click to toggle between starting/stopping vertex editing. When I double click a feature, I still get the popup window even though I think I have coded to prevent it: theLayer.on("dbl-click", function(evt) {
map.infoWindow.hide();
event.stop(evt);
//Do Something...
}); I would imagine that the event.stop() method is only addressing the double click event and not the single click event so how do I stop the popup during a double click event?
... View more
07-27-2016
11:50 AM
|
0
|
3
|
4225
|
|
POST
|
I currently want to check if the Editor is active or not so I noticed that the Editor has a getCurrentState method (undocumented?) which returns an object that contains a reference to the current tool, graphic, and a "isModified" boolean value. When the Editor is deactivated, the tool item is set to a value of zero. This got me wondering what that represents and I can't find any cross reference. The API Editor Reference has a list of constants but not what the true value of that constant is. I could assume that zero means the Editor is not active but I'd rather know definitively. Is there some location with this information about constants used in the 3.x API? Somewhat related, is there some other way I can determine if the Editor is active or not?
... View more
07-26-2016
02:31 PM
|
0
|
4
|
2313
|
|
POST
|
You can also fully change the renderer for a featureLayer as well. Here's another example where I'm changing the renderer for a USGS earthquake feed to have more levels of symbology (and custom icons): var theUsgsEarthquakeLayer = new FeatureLayer("http://igems.doi.gov/arcgis/rest/services/igems_haz/MapServer/3", {
id: "quakes",
mode: FeatureLayer.MODE_ONDEMAND,
refreshInterval: 5,
autoGeneralize: false,
outFields: ["*"]
});
if (theUsgsEarthquakeLayer != null) {
//define a popup template
var usgsQuakeTemplate = new InfoTemplate();
usgsQuakeTemplate.setContent(formatQuakeContent);
usgsQuakeTemplate.setTitle("Magnitude ${magnitude} Earthquake");
theUsgsEarthquakeLayer.setInfoTemplate(usgsQuakeTemplate);
theUsgsEarthquakeLayer.setAutoGeneralize(false);
//Create a different renderer with new symbols
var renderer = new ClassBreaksRenderer(null, "magnitude");
renderer.addBreak(0, 3, blueMarkerSymb);
renderer.addBreak(3, 5, greenMarkerSymb);
renderer.addBreak(5, 7, orangeMarkerSymb);
renderer.addBreak(7, 9, redMarkerSymb);
renderer.addBreak(9, Infinity, purpleMarkerSymb);
theUsgsEarthquakeLayer.setRenderer(renderer);
} else {
// Define the USGS Earthquake layer retrieved from a KML file instead
theUsgsEarthquakeLayer = new KMLLayer("http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/1.0_week_age_link.kml", {
id: 'quakes',
refreshInterval: 5,
visible: true
});
}
... View more
07-22-2016
08:26 AM
|
2
|
0
|
2118
|
|
POST
|
Yeeup, that's the basic idea. I've done this in one of my apps that has a graphicsLayer that contains user sketched graphics on the map: It's basically two ColorPicker widgets and utilize the color-change event to update a symbol that the layer's renderer uses. var pickerOutline = new ColorPicker({
color: "#ff0000",
showRecentColors: false,
showTransparencySlider: false
}, "clrOutline");
pickerOutline.startup();
pickerOutline.on("color-change", function(evt) {
var theOutline = fillSymbol.outline;
theOutline.color = pickerOutline.color;
fillSymbol.setOutline(theOutline);
theGLayer.redraw();
});
var pickerFill = new ColorPicker({
color: "#FFFF00",
showRecentColors: false,
showTransparencySlider: false
}, "clrFill");
pickerFill.startup();
pickerFill.on("color-change", function(evt) {
if(evt.color.toString() === "no-color") {
fillSymbol.setStyle(SimpleFillSymbol.STYLE_NULL);
} else {
fillSymbol.setStyle(SimpleFillSymbol.STYLE_SOLID);
fillSymbol.color = pickerFill.color;
}
lineSymbol.color = pickerFill.color;
theGLayer.redraw();
});
... View more
07-22-2016
08:22 AM
|
2
|
1
|
2118
|
|
POST
|
Joshua Tanner I haven't jumped onto the 4.x bandwagon yet. In the 3.x environment, I've used featureLayer.applyEdits to make the change: curFeatures = []; theLayer.clearSelection(); curFeatures = theLayer.graphics; theLayer.applyEdits(newFeatures, null, curFeatures, null, null);
... View more
07-21-2016
02:25 PM
|
0
|
2
|
2927
|
|
POST
|
Whoops, sorry- I forgot there's a little CSS modification for the background color and font boldening: .claro .dijitDialogTitle { font-weight: normal; } .claro .dijitDialogUnderlay { background: none repeat scroll 0 0 #101010; } .dijitTab .tabLabel { font-weight: bold; } .claro .dijitDialogPaneContent { background: none repeat-x scroll left top #FFFFD4; border-top: 1px solid #769DC0; padding: 10px 8px; position: relative; } (I'm using the default Dojo Claro theme..) I think that's it but, if not, just some simple exploration of the relevant object using a browser's developer tools should guide you towards which CSS class name and object needs modification.
... View more
07-19-2016
03:24 PM
|
1
|
0
|
3137
|
|
POST
|
I hate to go all ESRI sales person but this sounds like a perfect use scenario for the GeoEvent extension for ArcGIS Server. Short of that, I suppose you could incorporate a windows.setInterval based on some acceptable interval (1 minute? 30sec?) where you query the current location against the polygons in order to determine if you should warn the person of an approaching train.
... View more
07-19-2016
08:01 AM
|
1
|
1
|
3096
|
|
POST
|
It should be attached to one of my earlier responses in this thread. The file was mapHelp.JS
... View more
07-18-2016
01:42 PM
|
0
|
3
|
3137
|
|
POST
|
I did that but either my code was too much or something else because it appeared as though not all my code was present. I didn't want to risk posting partial code so I decided to just attach the file instead. I have a lot of distain for GeoNet.
... View more
07-15-2016
02:10 PM
|
0
|
5
|
3137
|
|
POST
|
I'm not using WebApp Builder but here's how I've accomplished something that I think looks similar. I have a separate JS file that constructs the dialog (see attached code) and the dialog is created/displayed on a button click that triggers the showHelp() function inside the JS file. I've also attached a screenshot of the dialog. The code isn't pasting very well into the post (Thanks, GeoNet!) so I'm attaching it as a file.
... View more
07-15-2016
12:58 PM
|
1
|
7
|
7141
|
|
POST
|
My current map shows the slider as double ended, like a moving window but that linked example is exactly what I'm trying to accomplish. I tried looking for that setting but somehow missed it. I'll see if I can tweak it later today. Thanks!
... View more
07-14-2016
10:08 AM
|
0
|
0
|
1316
|
|
POST
|
I want to use the time slider web app template with some data I have but I want the time animation to be cumulative like in Arcmap. Is that possible? I can't find a setting for that. Thanks! Steve
... View more
07-14-2016
08:20 AM
|
0
|
2
|
2777
|
|
POST
|
Hah. Twenty minutes after replying, I get an email from ESRI: "We would like to open the portal for your presentations to be included in the post conference proceedings. The portal to upload your presentation will be open from Friday, July 15 (8:00 am PST) to Wednesday, July 20 (6:00 pm PST). "
... View more
07-13-2016
10:01 AM
|
1
|
0
|
2467
|
|
POST
|
Presumably? I did a presentation during the conference and presenters were instructed to provide digital copies of their slides to their session moderators by a certain date or they would not be able to present at the conference. Granted it's been several years since my last UC presentation but this was a new requirement to me. So- they have the presentations; it's now a matter of uploading them.
... View more
07-13-2016
09:41 AM
|
0
|
1
|
2467
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Thursday | |
| 1 | Wednesday | |
| 1 | a week ago | |
| 2 | a week ago | |
| 1 | 2 weeks ago |