In React (CRA) project, cannot load azure-maps-geolocation-control.js external Azure Map script
I am working with a CRA React project. In a React component, I have tried to import and load an external Azure Map standalone script like azure-maps-geolocation-control which adds on to the Azure Map namespace (atlas). In this React component I have imported Azure Map SDK like azure-maps-control which works fine to render the map and supplies the namespace.
Under map ready event, I have tried to instantiate GeolocationControl object but seems like the script cannot read the atlas namespace. This external script is placed in public folder and dynamically placed in <head> of index.html .
How to make the script link to Azure Map SDK namespace, in a React component? Thank you
I am working with a CRA React project. In a React component, I have tried to import and load an external Azure Map standalone script like azure-maps-geolocation-control which adds on to the Azure Map namespace (atlas). In this React component I have imported Azure Map SDK like azure-maps-control which works fine to render the map and supplies the namespace. Under map ready event, I have tried to instantiate GeolocationControl object but seems like the script cannot read the atlas namespace. This external script is placed in public folder and dynamically placed in <head> of index.html . How to make the script link to Azure Map SDK namespace, in a React component? Thank youIn React functional component Read More