|
| 1 | +--- |
| 2 | +title: The Azure Maps Web SDK v1 migration guide |
| 3 | +titleSuffix: Microsoft Azure Maps |
| 4 | +description: Find out how to migrate your Azure Maps Web SDK v1 applications to the most recent version of the Web SDK. |
| 5 | +author: dubiety |
| 6 | +ms.author: yuchungchen |
| 7 | +ms.date: 08/18/2023 |
| 8 | +ms.topic: how-to |
| 9 | +ms.service: azure-maps |
| 10 | +--- |
| 11 | + |
| 12 | +# The Azure Maps Web SDK v1 migration guide |
| 13 | + |
| 14 | +Thank you for choosing the Azure Maps Web SDK for your mapping needs. This migration guide helps you transition from version 1 to version 3, allowing you to take advantage of the latest features and enhancements. |
| 15 | + |
| 16 | +## Understand the changes |
| 17 | + |
| 18 | +Before you start the migration process, it's important to familiarize yourself with the key changes and improvements introduced in Web SDK v3. Review the [release notes] to grasp the scope of the new features. |
| 19 | + |
| 20 | +## Updating the Web SDK version |
| 21 | + |
| 22 | +### CDN |
| 23 | + |
| 24 | +If you're using CDN ([content delivery network]), update the references to the stylesheet and JavaScript within the `head` element of your HTML files. |
| 25 | + |
| 26 | +#### v1 |
| 27 | + |
| 28 | +```html |
| 29 | +<link rel="stylesheet" href="https://atlas.microsoft.com/sdk/css/atlas.min.css?api-version=1" type="text/css" /> |
| 30 | +<script src="https://atlas.microsoft.com/sdk/js/atlas.min.js?api-version=1"></script> |
| 31 | +``` |
| 32 | + |
| 33 | +#### v3 |
| 34 | + |
| 35 | +```html |
| 36 | +<link rel="stylesheet" href="https://atlas.microsoft.com/sdk/javascript/mapcontrol/3/atlas.min.css" type="text/css" /> |
| 37 | +<script src="https://atlas.microsoft.com/sdk/javascript/mapcontrol/3/atlas.min.js"></script> |
| 38 | +``` |
| 39 | + |
| 40 | +### npm |
| 41 | + |
| 42 | +Install the latest [npm] package using the following command: |
| 43 | + |
| 44 | +```shell |
| 45 | +npm install azure-maps-control@latest |
| 46 | +``` |
| 47 | + |
| 48 | +## Review authentication methods (optional) |
| 49 | + |
| 50 | +To enhance security, more authentication methods are included in the Web SDK starting in version 2. The new methods include [Azure Active Directory Authentication] and [Shared Key Authentication]. For more information about Azure Maps web application security, see [Manage Authentication in Azure Maps]. |
| 51 | + |
| 52 | +## Testing |
| 53 | + |
| 54 | +Comprehensive testing is essential during migration. Conduct thorough testing of your application's functionality, performance, and user experience in different browsers and devices. |
| 55 | + |
| 56 | +## Gradual Rollout |
| 57 | + |
| 58 | +Consider a gradual rollout strategy for the updated version. Release the migrated version to a smaller group of users or in a controlled environment before making it available to your entire user base. |
| 59 | + |
| 60 | +By following these steps and considering best practices, you can successfully migrate your application from Azure Maps WebSDK v1 to v3. Embrace the new capabilities and improvements offered by the latest version while ensuring a smooth and seamless transition for your users. For more information, see [Azure Maps Web SDK best practices]. |
| 61 | + |
| 62 | +[Azure Active Directory Authentication]: how-to-secure-spa-users.md |
| 63 | +[Azure Maps Web SDK best practices]: web-sdk-best-practices.md |
| 64 | +[content delivery network]: /azure/cdn/cdn-overview |
| 65 | +[Manage Authentication in Azure Maps]: how-to-manage-authentication.md |
| 66 | +[npm]: https://www.npmjs.com/package/azure-maps-control |
| 67 | +[release notes]: release-notes-map-control.md |
| 68 | +[Shared Key Authentication]: how-to-secure-sas-app.md |
0 commit comments