POST
|
Hi, I'm using the standard basemap gallery and am getting all of the standard Esri basemaps. I want keep those, but also add a custom map service basemap that is saved on my ArcGIS Online account. How do I do that? I see here how you can set the source for your basemap gallery. I tried that in this codepen, but it didn't see to do anything. I want to be able to specify a specific map service. How do I do that?
... View more
12-17-2021
09:58 AM
|
0
|
1
|
376
|
POST
|
@jkumartry1980 Yes, I got it working, but it took a bit to get everything in place. First, I added the popupTemplate to all the feature layers in my map layerToAdd = new FeatureLayer(layer.service_url, {
outFields: ['*'],
id: layerName,
popupTemplate: {}, // required to trigger info panel
visible
}) Then I listened for a click on the view, and looked at all of the results: this.view.on('click', async (event) => {
// Use popup to select features on the map. Only features with popupTemplate enabled will be selected
const resp = await view.popup.fetchFeatures(event)
const results = await resp.allGraphicsPromise
if (Array.isArray(results)) {
if (results.length === 0) {
this.$emit('pointer-clicked-outside')
return
}
const popupResults = results.filter((r) => {
//do something with results, like highlight the selected feature
await this.highlightItem(r)
})
}
}) Lastly, I highlighted the selected graphic async highlightItem (gisInfo) {
const { view } = this
if (gisInfo.layer) {
const layerView = await view.whenLayerView(gisInfo.layer)
const selected = layerView.highlight(gisInfo)
this.highlightSelect.push(selected)
} else if (gisInfo?.sourceLayer?.layer) {
const layerView = await view.whenLayerView(
gisInfo.sourceLayer.layer
)
const selected = layerView.highlight(gisInfo)
this.highlightSelect.push(selected)
}
} I stripped out the code that wasn't applicable. I'm not sure if what I have above will work exactly as-is, but hopefully it gets you on the right track.
... View more
07-08-2021
09:51 AM
|
1
|
0
|
1643
|
POST
|
@EthanBodin1 thanks for the help! That wasn't exactly what I needed, but allSublayers got me on the right path. It turns out, in may case any way, popupEnabled was already true, it was just missing the popupTemplate. Here's what I ended up with: layerToAdd.allSublayers.forEach((sublayer) => {
sublayer.popupEnabled = true // required to trigger info panel
sublayer.popupTemplate = { // required to trigger info panel
outFields: ['*'] // required to view all attributes in popup
}
}) Thanks again for the help!
... View more
06-14-2021
11:16 AM
|
0
|
0
|
962
|
POST
|
How can I add a map service so that my users can click on features in the map service? In 3.x I used ArcGISDynamicMapServiceLayer. In 4.x I'm now using MapImageLayer to load the map service. Is that correct? To enable the popup on my FeatureLayer I just added popupTemplate: {}. You can't use that on MapImageLayer. What can I do to enable a popup? FYI, I'm using a custom panel to show the information, so I don't actually need a popup, I just need await view.popup.fetchFeatures(event) to trigger.
... View more
06-11-2021
04:24 PM
|
0
|
2
|
1040
|
POST
|
Hi @mdonnelly , That makes sense. I've noticed how some of the Esri sample apps change based on screen size. I will go with that route. Thanks, Matt
... View more
06-04-2021
02:23 PM
|
0
|
0
|
654
|
POST
|
Hi @IGCMCGIS , Yes, throwing that in an Expand widget works great! It looks good too (see below). Thanks!
... View more
06-04-2021
02:17 PM
|
1
|
1
|
1156
|
POST
|
I have a lot of widgets I want to show on left side of my map. If my is too short (like on a smartphone), the widgets don't all show (see here). Is there a way to wrap/overflow the widgets that don't fit on the display?
... View more
06-03-2021
12:58 PM
|
0
|
2
|
723
|
POST
|
How do I collapse the search widget in 4.x? I would like it to be like the search widget in 3.x, where it starts as a square button only, and expands out to show the entire widget once the user clicks on it.
... View more
06-03-2021
12:11 PM
|
0
|
4
|
1226
|
POST
|
@AndrewBowne, We exported a markup file from Field Maps and examined it and created code to create something similar. It works great! It would be awesome if Esri would document the markup syntax. I think a markup file is a great point of integration for Esri business partners like us.
... View more
05-03-2021
11:07 AM
|
0
|
1
|
1441
|
POST
|
Alix, Yes, you're right! I was on the wrong screen. I see the screen you are talking about now and I was able to delete the extra markup layers. Thanks! Where can I make a request to delete multiple markup layers at once? I had 30 layers to get rid of. That was pretty tedious doing them one at a time. Thanks again for your help! Matt
... View more
04-29-2021
03:27 PM
|
0
|
0
|
2166
|
POST
|
Hi Alix, Are you on iOS, because I don't see that at all? Maybe the Android app doesn't have that update yet?
... View more
04-29-2021
02:08 PM
|
0
|
0
|
2170
|
POST
|
I've imported several markup files into my Field Maps app. I want to remove them now. I see how I can turn them off, but how can I completely remove the markup layers from my map?
... View more
04-29-2021
11:02 AM
|
0
|
4
|
2219
|
POST
|
Hi Andrew, I want to generate a .markup file on my server. I figured out how to do it. Thanks for all of your help! Matt
... View more
04-29-2021
10:59 AM
|
0
|
1
|
1452
|
POST
|
Andrew, Thanks for explaining. Yes, I really like the markup workflow where I could send it to a user and when they open it, it opens it Field Maps. The only issue is, I want to generate the markup on my side, not in Field Maps. Is there documentation on how to manually create a .markup file?
... View more
04-29-2021
07:06 AM
|
0
|
3
|
1455
|
POST
|
Andrew, That did the trick. When I turned off my GPS, then it zoomed me to the correct location. It looks like a bug with Field Maps. I'm on the latest version of Field Maps on Android. Can you submit that as a bug? Thanks for your help!
... View more
04-29-2021
07:02 AM
|
0
|
1
|
1066
|
Title | Kudos | Posted |
---|---|---|
1 | 10-11-2023 01:33 PM | |
3 | 05-31-2022 10:40 AM | |
1 | 05-31-2022 10:37 AM | |
3 | 03-08-2021 09:02 AM | |
1 | 07-08-2021 09:51 AM |
Online Status |
Offline
|
Date Last Visited |
11-01-2023
11:58 PM
|