Created
May 8, 2025 10:23
-
-
Save martinoyovo/2e6051c0034745f30d9d9535d85738ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Future<void> loadFeatureLayers() async { | |
final portal = Portal.arcGISOnline(); | |
final item = PortalItem.withPortalAndItemId( | |
portal: portal, | |
itemId: '49e3861dd16d4b4abdadbb1acbf26bd8', | |
); | |
final bufferItem = PortalItem.withPortalAndItemId( | |
portal: portal, | |
itemId: 'ad36192fc08340cb877d31593e3ef204', | |
); | |
_pointFeatureLayer = FeatureLayer.withFeatureLayerItem(item); | |
_bufferFeatureLayer = FeatureLayer.withFeatureLayerItem(bufferItem); | |
await _pointFeatureLayer.load(); | |
await _bufferFeatureLayer.load(); | |
_pointFeatureLayer.isVisible = false; | |
_bufferFeatureLayer.isVisible = false; | |
_warningPointsTable = _pointFeatureLayer.featureTable; | |
_mapViewController.arcGISMap!.operationalLayers.addAll([ | |
_bufferFeatureLayer, | |
_pointFeatureLayer, | |
]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment