|
POST
|
I did look at that page about vector tile labeling but nothing there seemed to apply because I don't see where in the ArcGIS Pro interface I can set those properties. This documentation seems to refer to the Pro setting that translates to "text-allow-overlap" in vector tiles in the link @NathanCastle1 provided. And this doc seems to cover the setting that translates to "symbol-spacing". Hope that helps, but would still like to see your VTPKs that are used in the map (see the DM I sent you). To confirm, you are deploying multiple VTPKs to your Runtime app and combining them in a map, and not using them to generate a single VTPK in Pro, correct?
... View more
03-28-2022
06:06 AM
|
0
|
2
|
3511
|
|
POST
|
Hi @PaulCone2, I sent you a DM. Could you dig that out and get back to me please? Would like to take a look at the VTPK if possible. Thanks.
... View more
03-27-2022
07:37 AM
|
0
|
1
|
3528
|
|
POST
|
Thanks for providing those URLs. Each vector tile layer has a set of style resources to go with it. You can see those at these URLs: https://services.geodataonline.no/arcgis/rest/services/GeocacheVector/GeocacheBasisTerreng/VectorTileServer/resources/styles/?f=json https://services.geodataonline.no/arcgis/rest/services/GeocacheVector/GeocacheBasis/VectorTileServer/resources/styles/?f=json What's happening is that the style for the GeocacheBasisTerreng layer actually brings a couple more layers into the mix. Here's the style JSON's sources property: "sources": {
"esri": {
"url": "https://vector.services.geodataonline.no/arcgis/rest/services/GeocacheVector/GeocacheBasis/VectorTileServer/",
"type": "vector",
"maxzoom": 16,
"tiles": [
"https://vector.services.geodataonline.no/arcgis/rest/services/GeocacheVector/GeocacheBasis/VectorTileServer/tile/{z}/{y}/{x}.pbf"
]
},
"curves": {
"url": "https://vector.services.geodataonline.no/arcgis/rest/services/GeocacheVector/GeocacheHoydekurver/VectorTileServer/",
"type": "vector",
"maxzoom": 16,
"tiles": [
"https://vector.services.geodataonline.no/arcgis/rest/services/GeocacheVector/GeocacheHoydekurver/VectorTileServer/tile/{z}/{y}/{x}.pbf"
]
},
"hillshade": {
"url": "https://vector.services.geodataonline.no/arcgis/rest/services/GeocacheVector/GeocacheRelieff/VectorTileServer/",
"type": "vector",
"maxzoom": 16,
"tiles": [
"https://vector.services.geodataonline.no/arcgis/rest/services/GeocacheVector/GeocacheRelieff/VectorTileServer/tile/{z}/{y}/{x}.pbf"
]
}
} You can see the curves and hillshade layers that exist in addition to that specified in the GeocacheBasis layer. One of those, GeocacheHoydekurver has this JSON definition which has exportTilesAllowed set to false, which is disabling the overall layer: https://vector.services.geodataonline.no/arcgis/rest/services/GeocacheVector/GeocacheHoydekurver/VectorTileServer/?f=json You would need to reach out to the service owner to see if they could enable exporting tiles for the GeocacheHoydekurver service. Hope that helps!
... View more
03-25-2022
04:35 PM
|
0
|
0
|
2635
|
|
POST
|
Hi @AndrewMcLane, ArcGIS Runtime does NOT use any form of non-exempt encryption. From Runtime's perspective you can answer the questions as below (Runtime's use of exempt encryption is highlighted in red)… and then… Of course if your own code implements additional encryption, you'll have to take that into consideration. And you may still have an obligation to submit a self-classification report even if your app is compliant. Hope that helps.
... View more
03-25-2022
07:59 AM
|
1
|
1
|
1114
|
|
POST
|
Hi, If you're working with a Web Map that has popups defined, your should really read the popup definitions from the AGSIdentifyLayerResults you get back where possible. You say it's empty, but if the Web Map has popups defined, it should not be so I'd like to dig into that a bit more. What does the `popups` array on each AGSIdentifyLayersResult contain? Could you try setting returnPopupsOnly to true on the identify call? That will make sure that layers that do not have popups defined are not included in the results you get back, in case you are accidentally looking at the wrong layer (perhaps the web map has multiple similar layers but only popups defined on one of them?). Thanks!
... View more
03-24-2022
10:27 AM
|
0
|
1
|
1665
|
|
POST
|
Thanks for the great repro case, @ShiminCai. I'll share what we discussed via DM here in case others might find the explanation helpful. You have this code in your repro app, which is creating a feature, adding it to the AGSGeodatabaseTable, then updating it: @objc func sketchEditorGeometryDidChange() {
if sketchEditor.isSketchValid == true {
let newFeature = createNewFeature(geometry: sketchEditor.geometry!, featureLayer: featureLayer, featureTemplate: featureTemplate)
addFeature(newFeature: newFeature, featureLayer: featureLayer)
sketchEditor.stop()
updateFeature(feature: newFeature!)
}
}
func addFeature(newFeature: AGSFeature?, featureLayer: AGSFeatureLayer) {
if let featureTable = featureLayer.featureTable, featureTable is AGSGeodatabaseFeatureTable {
let geodatabaseFeatureTable = featureTable as! AGSGeodatabaseFeatureTable
geodatabaseFeatureTable.add(newFeature!, completion: { error in
if let error = error {
print("Error while adding feature: \(error.localizedDescription)")
return
}
})
}
}
func updateFeature(feature: AGSFeature) {
feature.attributes["SequenceNumber"] = sequenceNumber
featureLayer.featureTable!.update(feature, completion: { error in
if error != nil {
print(error!.localizedDescription)
//Geodatabase item not found.
} else {
self.sequenceNumber += 1
}
})
} However, AGSGeodatabaseTable.add() is an asynchronous function, but you are not waiting for it to complete before you call AGSGeodatabaseTable.update(). So in other words, update() is being called to update an on-disk feature that isn't yet committed in the underlying .geodatabase file. Changing your code to this fixes the issue: @objc func sketchEditorGeometryDidChange() {
if sketchEditor.isSketchValid == true {
let newFeature = createNewFeature(geometry: sketchEditor.geometry!, featureLayer: featureLayer, featureTemplate: featureTemplate)
addFeature(newFeature: newFeature, featureLayer: featureLayer) { error in
if let error = error {
print("Error \(error.localizedDescription)")
return
}
self.updateFeature(feature: newFeature!)
}
sketchEditor.stop()
}
}
func addFeature(newFeature: AGSFeature?, featureLayer: AGSFeatureLayer, completion: @escaping (Error?) -> Void) {
if let featureTable = featureLayer.featureTable, featureTable is AGSGeodatabaseFeatureTable {
let geodatabaseFeatureTable = featureTable as! AGSGeodatabaseFeatureTable
geodatabaseFeatureTable.add(newFeature!, completion: { error in
if let error = error {
print("Error while adding feature: \(error.localizedDescription)")
completion(error)
return
}
completion(nil)
})
}
} This code calls update() from the completion handler on add(), ensuring that add() has actually finished its work first. In general, if a method has a completion block, it's safe to assume that until that completion block is called, the method won't have finished its work. Sometimes that's OK (for example, when setting a viewpoint on a map view) but other times it's critical to wait, as in this case. Hope this helps!
... View more
03-24-2022
10:04 AM
|
1
|
1
|
1919
|
|
POST
|
Hi. I think we would have to know more about the schema of the data. Do you have any domains or relationship classes defined in the data? Perhaps an attributed relationship?
... View more
03-22-2022
02:17 PM
|
0
|
1
|
1929
|
|
POST
|
Hi, There are 4 core approaches that you can pick from to build an offline app, outlined here. For a completely offline app that will never be able to connect to a network, @VolkerMatzken's suggested option of creating a Mobile Map Package in ArcGIS Pro is a great approach (Pro can also generate Mobile Geodatabases that you can open in your Runtime app - the difference really depends on whether you want to configure the map in Pro or programmatically define one in your Runtime app). But as you noticed, you will need a way to create the local file(s) that you will use though. As mentioned in @VolkerMatzken's reply, you can use ArcGIS Pro to create a Mobile Map Package (MMPK) or Mobile Geodatabase, or you can create Shapefiles or GeoPackages with Pro and many other tools. Note however that non-Esri-proprietary file formats like Shapefiles, GeoPackages etc. will require a Standard Runtime license, whereas working with Esri-proprietary files created with ArcGIS Pro (e.g. MMPKs, Mobile Geodatabases, Tile Packages, or Vector Tile Packages) can be used with a Lite license. If you intend to edit feature data, you will need a Basic license. You can learn more about the license levels here, although as a quick summary: you can do most things at Lite, editing requires Basic, and non-Esri-proprietary local files require Standard. You most likely don't need Local Server. Local Server is a specialized augmentation to Runtime that is meant for consuming specific geoprocessing workflows or connecting to enterprise geodatabases. Hope that helps.
... View more
03-22-2022
08:40 AM
|
2
|
0
|
2088
|
|
POST
|
The Map View is used to display an ArcGISMap. It is not itself a map. See this introductory documentation. But since this is a web map that is hosted, just open the web map by creating a portal item that refers to the item you got the JSON from. There's no need to retrieve and work with that JSON yourself. See this tutorial: https://developers.arcgis.com/android/maps-2d/tutorials/display-a-web-map/ If you really need to open the JSON, create an ArcGISMap from the JSON. Display that in the map view.
... View more
03-16-2022
07:33 AM
|
0
|
0
|
1119
|
|
POST
|
Hi. I think you're looking for the TextLayout property: https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Mapping.LabelDefinition.TextLayout.html Does that do what you're after?
... View more
03-15-2022
09:58 AM
|
1
|
0
|
942
|
|
POST
|
Hi. The problem you're seeing is that you're trying to use an AGSLayer that is already being used. In Runtime, for performance reasons, many objects cannot be used (or "owned") by more than one other object. In this case, your AGSMap owns a AGSBasemap which owns the layer you are reusing (Coast_url). Your code is trying to create a new AGSBasemap with a layer that is already "owned" by map's current basemap. If you look in the Xcode console, you will see the following when you try to create the new AGSMap. ArcGIS Runtime Error Occurred. Set a breakpoint on C++ exceptions to see the original callstack and context for this error: Error Domain=com.esri.arcgis.runtime.error Code=24 "Object is already owned." UserInfo={NSLocalizedFailureReason=Already owned., NSLocalizedDescription=Object is already owned., Additional Message=Already owned.} Instead, you will need to create an entirely new AGSArcGISMapImageLayer (or AGSArcGISTiledLayer) and use that in a new AGSBasemap. You could modify your code like this to achieve this, using an enum instead of strings… enum CustomBasemap {
enum Language {
case EN
case AR
}
case coast
case satellite
case hybrid(language: Language)
case streetmap(language: Language)
func getLayer() -> AGSLayer {
switch self {
case .coast:
return AGSArcGISMapImageLayer(url: URL(string:"https://services.gisqatar.org.qa/server/rest/services/Vector/Coast/MapServer")!)
case .satellite:
return AGSArcGISTiledLayer(url: URL(string:"https://services.gisqatar.org.qa/server/rest/services/Imagery/QatarSatelitte/MapServer")!)
case .hybrid(let language):
switch language {
case .EN:
return AGSArcGISTiledLayer(url:URL(string: "https://services.gisqatar.org.qa/server/rest/services/Vector/Qatar_StreetMap_Hybrid_E/MapServer")!)
case .AR:
return AGSArcGISTiledLayer(url:URL(string: "https://services.gisqatar.org.qa/server/rest/services/Vector/Qatar_StreetMap_Hybrid_Ar_Test/MapServer")!)
}
case .streetmap(let language):
switch language {
case .EN:
return AGSArcGISTiledLayer(url:URL(string: "https://services.gisqatar.org.qa/server/rest/services/Vector/Qatar_StreetMap_E/MapServer")!)
case .AR:
return AGSArcGISTiledLayer(url:URL(string: "https://services.gisqatar.org.qa/server/rest/services/Vector/Qatar_StreetMap_A/MapServer")!)
}
}
}
func getBasemap() -> AGSBasemap {
return AGSBasemap(baseLayer: getLayer())
}
} and then set the basemap on the existing map (which will save you creating a new map and setting initialViewpoints): var basemapType: CustomBasemap = .coast
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
self.map = AGSMap(basemap: basemapType.getBasemap())
self.mapView.map = self.map
self.SetMapExtent()
}
...
func Coast_Map_Tapped() {
basemapType = .coast
self.map.basemap = basemapType.getBasemap()
} Hope that helps.
... View more
03-15-2022
07:48 AM
|
0
|
1
|
2733
|
|
POST
|
One other question: Can you open this vector tile layer in ArcGIS Pro or ArcGIS Online and see if it behaves the same way please?
... View more
03-14-2022
01:18 PM
|
0
|
1
|
1314
|
|
POST
|
Hi, There isn't any feature reduction built into Vector Tiles, so this seems like it must be a function of how the tiles are baked. Are you creating the vector tiles in ArcGIS Pro? Is there a rendering rule in Pro that would remove this feature as you zoom out?
... View more
03-10-2022
10:34 AM
|
0
|
2
|
1330
|
|
POST
|
Hi, You can, but bear in mind a couple of things: The Map Service must allow its layers to be queried (you can see the Query action is enabled on this sublayer, for example so that will work in this case), and Map Image Services are rendered on the server. These days we recommend using Feature Services if you can as clients can do so much in terms of rendering now (and in fact querying may be quicker as Runtime might be able to use its in-memory feature cache). You would have to create a new AGSServiceFeatureTable for each sublayer (not for display) and query that, or else simply add those layers to the map instead of the single MapImageService. If you must use MapImage services (but again, in general I'd recommend publishing as Feature Services and using Feature Layers in the app), you can try this modification to the above code… let featureTablesForMapLayers = self.map.operationalLayers.compactMap {
$0 as? AGSArcGISMapImageLayer
}.flatMap { [self] (mapImageLayer: AGSArcGISMapImageLayer) -> [URL] in
let allSublayers = mapImageLayer.mapImageSublayers.flatMap({
self.getAllSublayers(for:$0 as! AGSArcGISMapImageSublayer)
})
let visibleSubLayers = allSublayers.filter { $0.isVisible(atScale: currentScale) }
return visibleSubLayers.compactMap {
if let layer = $0 as? AGSArcGISSublayer {
return mapImageLayer.url!.appendingPathComponent("\(layer.sublayerID)")
}
return nil
}
}.map {
AGSServiceFeatureTable(url: $0)
}
let featureTablesForFeatureLayers = self.map.operationalLayers.compactMap {
// Let's reduce the layers to just AGSFeatureLayers
$0 as? AGSFeatureLayer
}.filter {
// Clear the selection from any previous selection.
$0.clearSelection()
// Make sure we just consider the currently visible layers.
// Just return true if you want all layers, regardless of current scale.
return $0.isVisible(atScale: currentScale)
}.compactMap {
// Convert the sequence to AGSFeatureTables
$0.featureTable
}
let allFeatureTablesInMap = featureTablesForMapLayers + featureTablesForFeatureLayers
allFeatureTablesInMap.forEach { featureTable in
// Query each feature table, coordinating responses using the DispatchGroup.
queryGroup.enter()
... And add this method… func getAllSublayers(for layer: AGSLayerContent) -> [AGSLayerContent] {
if layer.subLayerContents.isEmpty {
return [layer]
} else {
let allSublayers = layer.subLayerContents
.compactMap({ $0 as? AGSArcGISSublayer })
.flatMap {
getAllSublayers(for: $0)
}
return allSublayers
}
} Note that selection is not possible when using MapImageServices.
... View more
03-10-2022
10:23 AM
|
0
|
0
|
3658
|
|
POST
|
Hi @syamkumarsurendran, If I understand your question correctly, you want the current location (aka the blue dot) to be closer to the bottom of the screen than the default center. The property to control this is on LocationDisplay (which you can get from MapView.getLocationDisplay()). See setNavigationPointHeightFactor(), and you might also find setWanderExtentFactor() useful too. Hope that helps!
... View more
03-09-2022
08:56 AM
|
0
|
1
|
1081
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | a week ago | |
| 2 | 3 weeks ago | |
| 4 | a month ago | |
| 1 | 01-29-2026 09:39 AM | |
| 1 | 12-17-2025 10:12 AM |