Not able to display map using Map from react-map-gl after added Auth through CLI. #10616
Open
3 tasks done
Labels
Geo
Related to the Geo category
question
General question
transferred
This issue was transferred from another Amplify project
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Authentication, Geo
Amplify Categories
geo
Environment information
Describe the bug
I had React Map component working using IdentityPool and map resources in Oregon. My region is in CA. But CA does not support map, thus the divergence. Anyway, I have every thing working using the react Map component.
However after I added auth through CLI, of course, it created the user pool and identity pool in Oregon. The access to the map resource is denied. I tried to tie the user pool to my initial identity pool with no success.
Anything I can do to have the access to the Map resource and with auth?
Another question, does Mapview from Amazon support {Source} and {Layer} from react-map-gl? If so I may switch to use Mapview.
Expected behavior
Access to Map resource in Oregon should be granted after auth addition.
Reproduction steps
1 create Map resources, identity pool in Oregon, define the permission for unauth users
2 manually configure Auth:
**Amplify.configure({
Auth: {
identityPoolId: IDENTITY_POOL_ID, // REQUIRED - Amazon Cognito Identity Pool ID
region: REGION, // REQUIRED - Amazon Cognito Region
},
geo: {
AmazonLocationService: {
maps: {
items: {
[MAP.NAME]: {
// REQUIRED - Amazon Location Service Map resource name
style: [MAP.STYLE], // REQUIRED - String representing the style of map resource
},
},
default: [MAP.NAME], // REQUIRED - Amazon Location Service Map resource name to set as default
},
region: REGION, // REQUIRED - Amazon Location Service Region
},
},
});**
After add the auth, I believe #3 failed.
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: