|
POST
|
I released a map in August. At that time, I was using MapImageLayer to pull in my trails layer. All was working as expected. I noticed yesterday that the trails are no longer pulling in and displaying on my map. I've republished the service and have checked that it is working. My code hasn't changed, so I assume there has been a change elsewhere that is affecting the layer. I haven't been able to narrow down the issue yet. Any ideas? Here's the code: //Add SP trails feature layer
var spTrailsLayer = new MapImageLayer({
url: "https://conservationgis.alabama.gov/adcnrweb/rest/services/DCNRTrails/MapServer",
sublayers:
[{id:0,
popupTemplate: {
title: "{TrailName}",
content: "Trail Type: {TrailType}<br><br>Located On: {Tract}<br><br>Length (mi.): {Mileage}"},
definitionExpression: "SPorFW = 'SP'",
}],
title: "State Park Trails",
});
spTrailsLayer.minScale = 250000;
// watch handler: the callback fires each time the scale of the view changes
var handle = view.watch('scale', function(newScale) {
console.log("Scale: ", newScale);
if (newScale > 250000) {
spTrailsLayer.listMode = 'hide';
} else {
spTrailsLayer.listMode = 'show';
}
});
... View more
12-06-2019
06:52 AM
|
0
|
2
|
1123
|
|
POST
|
I need to add some additional functionality to a map, namely the search widget. To keep the screen open, I want to use Expand with it. However, as soon as I add Expand in, the search widget no longer functions properly. The widget stays collapsed and never allows the user to search. Here's that portion of my code. Am I missing something? //Add search widget
var searchWidget = new Search({
view: view,
});
var searchExpand = new Expand({
view: view,
content: searchWidget.domNode,
expandIconClass: "esri-icon-search"
});
// Add the search widget to the top left corner of the view
view.ui.add(searchExpand, "top-right"); Thanks in advance for any guidance! Ashley
... View more
10-09-2019
12:54 PM
|
0
|
2
|
1273
|
|
POST
|
Code block for the layer that isn't working: var artificialReefsLayer = new MapImageLayer({
url: "https://conservationgis.alabama.gov/adcnrweb/rest/services/ArtificialReefs/MapServer",
sublayers:
[{id:0,
popupTemplate: {
title: "{Reef_Name}",
content: "The {Reef_Name} is an {Reef_Type} built in {Year}. It is constructed of {Material} and is located at a depth of {Depth} feet in the {Zone} zone at {GPS_Latitu}, {GPS_Longit} ({Latitude_D}, {Longitude}).<br><br> From Perdido Pass, the reef is located {Distance_P} nautical miles offshore. <br><br> From Sand Island Lighthouse, the reef is located {Distance_S} nautical miles offshore."},
}],
title: "Artificial Reefs",
});
artificialReefsLayer.visible = false; Code block for one of the layers that is working: var fwTrailsLayer = new MapImageLayer({
url: "https://conservationgis.alabama.gov/adcnrweb/rest/services/DCNRTrails/MapServer",
sublayers:
[{id:0,
popupTemplate: {
title: "{TrailName}",
content: "Trail Type: {TrailType}<br><br>Located On: {Tract}<br><br>Length (mi.): {Mileage}"},
definitionExpression: "SPorFW = 'FW'",
}],
title: "Forever Wild Trails",
});
fwTrailsLayer.minScale = 250000;
// watch handler: the callback fires each time the scale of the view changes
var handle = view.watch('scale', function(newScale) {
console.log("Scale: ", newScale);
if (newScale > 250000) {
fwTrailsLayer.listMode = 'hide';
} else {
fwTrailsLayer.listMode = 'show';
}
}); I'm not seeing anything blatantly different between the two. Both are later added to the map as part of a group layer.
... View more
07-31-2019
01:37 PM
|
0
|
2
|
1522
|
|
POST
|
Yes, once that layer is visible, the popup and the highlight do not work. But it's working on all of the other MapImageLayers.
... View more
07-31-2019
01:33 PM
|
0
|
0
|
1522
|
|
POST
|
Robert, I've implemented the code from above and it works beautifully on all of my MapImageLayers but one. From what I can tell the only difference is that this layer I want the user to turn on, so I've set the visibility to false. Any ideas? Ashley
... View more
07-31-2019
01:27 PM
|
0
|
5
|
5058
|
|
POST
|
Robert, A huge thank you! I've been trying to figure that out all day. Ashley
... View more
07-29-2019
01:14 PM
|
0
|
0
|
5058
|
|
POST
|
Hua, Did you find a work around to highlight the popup's selected feature when using MapImageLayer? I'd like to do the same thing in 4.12. Ashley
... View more
07-29-2019
11:53 AM
|
0
|
8
|
5058
|
|
POST
|
Noah, The only difference I see between the two is that in the 3.x map that is live I have the layer that is displaying correctly brought in as an ArcGISDynamicMapServiceLayer. In the 4.x map that I'm working on, it is being brought in as a FeatureLayer. The line is multi-layer, either 2 or 3 layers, depending on what I needed for the line itself. Ashley
... View more
07-22-2019
10:47 AM
|
0
|
4
|
2148
|
|
POST
|
Also at: https://conservationgis.alabama.gov/adcnrweb/rest/services/SP_DCNR/MapServer/1
... View more
07-19-2019
01:18 PM
|
0
|
1
|
2148
|
|
POST
|
Noah, there is no rendering set in the app. The service can be hit at: https://conservationgis.alabama.gov/adcnrweb/rest/services/Trails/MapServer.
... View more
07-19-2019
01:16 PM
|
0
|
2
|
2148
|
|
POST
|
I'm using services that I've had published for years. On my live site, the symbology is displaying correctly (multi-colored line). The live site is using version 3.14 of the API. I'm rebuilding the maps using version 4.12. With the new API, the line is displaying as solid green. The symbology should be the same as the live site. Anyone else having a similar issue? Ashley
... View more
07-19-2019
10:38 AM
|
0
|
9
|
2310
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-30-2025 01:35 PM | |
| 1 | 08-31-2023 01:21 PM | |
| 1 | 02-04-2025 06:23 AM | |
| 1 | 08-21-2023 01:28 PM | |
| 1 | 03-04-2024 01:50 PM |
| Online Status |
Offline
|
| Date Last Visited |
Wednesday
|