Closed nhimrmh closed 1 month ago
Hi there! Thanks for reaching out. You are correct to set your API key via ArcGISEnvironment.apiKey
. You don't need to set it specifically on, e.g. the feature layer. So that part is good.
An initial thing to check - are you calling ArcGISEnvironment.apiKey = [apiKey];
in the main()
method before you call runApp
?
i.e. in your main.dart
file:
void main() {
ArcGISEnvironment.apiKey = [apiKey];
runApp(MyApp());
}
Closing as resolved. If you have further questions regarding setting the API key, feel free to reopen this issue.
Hello, Currently I run into an issue when trying to add a private Feature Layer to Gis map, error:
An ArcGIS authentication error occurred when accessing "[feature_layer_url]". An API key or credential may be required. For more information see (https://developers.arcgis.com/documentation/mapping-apis-and-services/security/).
Since there's no information or any example that mentions about setting api key to feature layer, I wonder how that can be done?
I've tried this but not work