|
POST
|
Michelle, the problem is not with the image service itself. It is with the basemapGallery widget. Here is a link to a thread with a potential workaround... Cached Image Service behaving dynamically in basemap gallery
... View more
03-24-2016
08:14 AM
|
0
|
0
|
1384
|
|
POST
|
Thanks for the link Robert. I took a look at the AMD code for the BasemapGallery. It looks like there is no hope for the service getting loaded to the basemap gallery as a tiled layer unless the service has a 'mapName' property. Unfortunately, Image service don't have this property. Instead, they have a 'name' property. Here is a potential workaround that I have been "fiddling" with. Essentially, it involves loading the Cached image service as a standard ArcGISTiledMapServiceLayer, then using the basemapGallery's selection-change event to add or remove it from the map. https://jsfiddle.net/bdaigle/22Lgp45f/8/
... View more
03-24-2016
08:10 AM
|
1
|
6
|
3359
|
|
POST
|
Also, you may want to swtich the selection mode to 'none' if you plan to use the checkbox instead of the default selection functionality.
... View more
03-23-2016
03:45 PM
|
0
|
0
|
1445
|
|
POST
|
Try using the editor extension. Here is an example: JS Bin - Collaborative JavaScript Debugging
... View more
03-23-2016
03:41 PM
|
1
|
2
|
1445
|
|
POST
|
You should be able to something along these lines: var slider = new HorizontalSlider({
name: "slider",
value: 5,
minimum: 0,
maximum: 2000,
intermediateChanges: true,
style: "width:300px;",
onChange: function(value){
var layerDefinitions = [];
layerDefinitions[0] = "WellDepth > "+value;
yourMapLayer.setLayerDefinitions(layerDefinitions, false);
}
}, "slider").startup();
... View more
03-23-2016
03:29 PM
|
1
|
1
|
2662
|
|
POST
|
I am attempting to load a cached Image Service into a basemap gallery. The image service does work, but it is behaving like a dynamic image service, not a cached one. By that, I mean that it is running a export image request each time the map pans instead of fetching the pregenerated tiles. Here is a link to the service: https://gisservicemt.gov/arcgis/rest/services/MSL/Reference100k_cached/ImageServer Here is the link to a jsFiddle demonstrating a basemap gallery with one tiled map service and one tiled image service. https://jsfiddle.net/bdaigle/22Lgp45f/ If you watch the network traffic, you will see that the two basemaps handle the request very differently -- the tiled map service fetches map tiles, whereas the tile image service runs an exportImage task. The service does behave like a cached service if I explicitly define it as a ArcGISTiledMapServiceLayer and load it to the map manually (without the use of the Basemap Gallery), so I believe this is an issue with the BasemapGallery itself. I have a couple of ideas for work arounds, but thought I would check with the community before going down that road. Any ideas???
... View more
03-23-2016
03:22 PM
|
0
|
14
|
5889
|
|
POST
|
Hi Sam, The extent will get passed if you set the preserveScale parameter to false: PrintTemplate | API Reference | ArcGIS API for JavaScript. Personally, I find it more intuitive to lock down the scale so the map doesn't zoom in or out, which can change the image significantly if you have scale dependencies set.
... View more
03-21-2016
05:50 AM
|
1
|
3
|
4293
|
|
POST
|
I am not sure it is an actual bug -- just a workflow they have not accounted for yet. The ability to add and delete rows does seem like a pretty major omission from an editing widget.
... View more
03-18-2016
01:34 PM
|
0
|
0
|
1097
|
|
POST
|
I think I may have found a workaround. It looks like the dGrid got decoupled from the featureLayer at 3.16, so updates to the dGrid later get posted to the featureLayer instead of the other way around. The workaround involves calling a private function "_createStoreFromDataQuery", which appears to recreate the store and regenerate the grid. See it in action here: https://jsfiddle.net/waybmh8v/3/ I don't like using private functions, but it seems like this might be might best bet at this point. In the long run it would be nice to see functions associated with adding, deleting and updating featureTable items programmatically. It doesn't seem possible at this point.
... View more
03-18-2016
01:24 PM
|
2
|
1
|
1097
|
|
POST
|
I am trying to upgrade to 3.16, but I'm having problems with changes in the featureTable dijit. At 3.15, the feature table would automatically update after the underlying feature layer updated. This does not appear to be this case with the new version at 3.16. Here are 2 jsFiddles that demonstrate the issue: Feature Table Add 3.15 - JSFiddle Feature Table Add 3.16 - JSFiddle In the 3.15 version, the table refreshes after the new record is added. In 3.16, I can't get the table to refresh without loading the page. I noticed at 3.16 there is 'refresh' function, but it does not appear to have any affect. Anyone know how to force a refresh?
... View more
03-18-2016
10:05 AM
|
1
|
3
|
3153
|
|
POST
|
Something like this? FWP Data Review To do so, we put the dimension in an object: this.templateInfos = [{
'name': "Landscape - Letter",
'dims': {
'width': 10.2,
'height': 6.1866
}
}, {
'name': "Landscape - 17 x 11",
'dims': {
'width': 16,
'height': 8.05
}
}, {
'name': "Map Only - 8 x 8",
'dims': {
'width': 8,
'height': 8
}
}];
Then use the following function to update the graphic each time the select is changed. _updatePrintArea: function(val) {
var _this = this;
if (val == " ") {
return;
}
this.printLayoutGraphicLayer.clear();
var layoutDims = null;
array.forEach(this.templateInfos, function(templateInfo) {
if (val == templateInfo.name) {
layoutDims = templateInfo.dims;
}
});
var screenPolygon = new Polygon();
var cntrPnt = screenUtils.toScreenGeometry(this.map.extent, this.map.width, this.map.height, this.map.extent.getCenter());
//add the outside of the polygon as a ring
var dpi = 96;
var outerRingOffset = dpi * 10;
var yOffset = dpi * layoutDims.height / 2;
var xOffset = dpi * layoutDims.width / 2;
screenPolygon.addRing([
[cntrPnt.x + (xOffset + outerRingOffset), cntrPnt.y + (yOffset + outerRingOffset)],
[cntrPnt.x + (xOffset + outerRingOffset), cntrPnt.y - (yOffset + outerRingOffset)],
[cntrPnt.x - (xOffset + outerRingOffset), cntrPnt.y - (yOffset + outerRingOffset)],
[cntrPnt.x - (xOffset + outerRingOffset), cntrPnt.y + (yOffset + outerRingOffset)],
[cntrPnt.x + (xOffset + outerRingOffset), cntrPnt.y + (yOffset + outerRingOffset)]
]);
//add the data frame as an inner ring
screenPolygon.addRing([
[cntrPnt.x + xOffset, cntrPnt.y + yOffset],
[cntrPnt.x + xOffset, cntrPnt.y - yOffset],
[cntrPnt.x - xOffset, cntrPnt.y - yOffset],
[cntrPnt.x - xOffset, cntrPnt.y + yOffset],
[cntrPnt.x + xOffset, cntrPnt.y + yOffset]
]);
function getMapGeom(screenGeom) {
return screenUtils.toMapGeometry(_this.map.extent, _this.map.width, _this.map.height, screenGeom);
}
//convert the polygon from screen coordinates to web merc
var mapPoly = getMapGeom(screenPolygon);
//add the polygon to the map
this.printLayoutGraphicLayer.add(new Graphic(mapPoly, this.symbols.polygon));
//add labels to the map
var symbolLabel1 = new TextSymbol("Outside Print Area").setColor(new Color([200, 200, 200])).setAlign(TextSymbol.ALIGN_MIDDLE).setFont(new Font("12pt", Font.STYLE_NORMAL, Font.VARIANT_NORMAL, Font.WEIGHT_BOLD, "Arial"));
var symbolLabel2 = new TextSymbol("Outside Print Area").setAngle(90).setColor(new Color([200, 200, 200])).setAlign(TextSymbol.ALIGN_MIDDLE).setFont(new Font("12pt", Font.STYLE_NORMAL, Font.VARIANT_NORMAL, Font.WEIGHT_BOLD, "Arial"));
var symbolLabel3 = new TextSymbol("Outside Print Area").setAngle(-90).setColor(new Color([200, 200, 200])).setAlign(TextSymbol.ALIGN_MIDDLE).setFont(new Font("12pt", Font.STYLE_NORMAL, Font.VARIANT_NORMAL, Font.WEIGHT_BOLD, "Arial"));
this.printLayoutGraphicLayer.add(new Graphic(getMapGeom(cntrPnt.offset(0, yOffset + 0.2 * dpi)), symbolLabel1));
this.printLayoutGraphicLayer.add(new Graphic(getMapGeom(cntrPnt.offset(0, -1 * (yOffset + 0.1 * dpi))), symbolLabel1));
this.printLayoutGraphicLayer.add(new Graphic(getMapGeom(cntrPnt.offset(xOffset + 0.1 * dpi, 0)), symbolLabel2));
this.printLayoutGraphicLayer.add(new Graphic(getMapGeom(cntrPnt.offset(-1 * (xOffset + 0.1 * dpi), 0)), symbolLabel3));
if (this.extentChangeHandler) {
this.extentChangeHandler.remove();
}
this.extentChangeHandler = this.map.on('extent-change', function() {
_this._updatePrintArea(val);
});
}
... View more
03-16-2016
03:12 PM
|
3
|
1
|
4293
|
|
POST
|
Has anyone out there done a successful build an app using the version 3.16? For some reason, dojo's build system doesn't seem to like moment.js, which appears to be a dependency of 3.16. The first error that I get in my build report is: moment.js.uncompressed.js:9: ERROR - Parse error. '}' expected
import { hooks as moment, setHookCallback } from './lib/utils/hooks';
^
1 error(s), 0 warning(s)
Done (compile time:0.114s) There are many other errors as well, all associated with the moment library. I took a cursory look at the library. It appears as thought it was written using ES6 syntax. Not sure if this a problem for the build system. Anyone else having luck with 3.16 builds? Rene Rubalcava Lloyd Heberlie
... View more
03-16-2016
08:50 AM
|
0
|
4
|
3302
|
|
POST
|
Thanks Peter, We already use window's task scheduler. It works OK, but is a pain whenever I leave the office and take my computer with me. We end up manually setting up the tasks on another user's computer temporarily, then disabling them when I get back in the office. Long term, I think we're better off running the tasks on a server instead of my desktop. I have not used virtualenv, so I was curious if this was giving you more flexibility when implementing scheduled tasks.
... View more
02-17-2016
03:13 PM
|
0
|
1
|
877
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-21-2017 10:00 AM | |
| 1 | 09-11-2015 08:24 AM | |
| 1 | 01-25-2016 12:30 PM | |
| 1 | 05-27-2015 08:12 AM | |
| 1 | 06-09-2015 03:28 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|