arnaudleclerc / AzureMapsControl.Components

Razor Components for azure-maps-control
MIT License
31 stars 12 forks source link

What is required to use Azure Maps version 3? #87

Open DavidThielen opened 6 months ago

DavidThielen commented 6 months ago

According to this I think it's just:

<link rel="stylesheet" href="https://atlas.microsoft.com/sdk/javascript/mapcontrol/3/atlas.min.css" type="text/css">
<script src="https://atlas.microsoft.com/sdk/javascript/mapcontrol/3/atlas.min.js"></script>

Is that it? Any change to:

<link rel="stylesheet" href="https://atlas.microsoft.com/sdk/javascript/drawing/0.1/atlas-drawing.min.css" type="text/css" />
<link rel="stylesheet" href="https://atlas.microsoft.com/sdk/javascript/indoor/0.1/atlas-indoor.min.css" type="text/css" />
<script src="https://atlas.microsoft.com/sdk/javascript/drawing/0.1/atlas-drawing.min.js"></script>
<script src="https://atlas.microsoft.com/sdk/javascript/indoor/0.1/atlas-indoor.js"></script>

That seems to work fine - but I don't know if there's something in the component that will break with this change.

thanks - dave

DavidThielen commented 6 months ago

According to this, do we need to change to:

<link rel="stylesheet" href="https://atlas.microsoft.com/sdk/javascript/drawing/1/atlas-drawing.min.css" type="text/css" />
<script src="https://atlas.microsoft.com/sdk/javascript/drawing/1/atlas-drawing.min.js"></script>

And if I don't allow drawing, do I even need these at all?

DavidThielen commented 6 months ago

And according to this, do we need to change to:

<link rel="stylesheet" href="https://atlas.microsoft.com/sdk/javascript/indoor/0.2/atlas-indoor.min.css" type="text/css"/>
<script src="https://atlas.microsoft.com/sdk/javascript/indoor/0.2/atlas-indoor.min.js"></script>

And again, do we need this at all if we don't use indoor maps?

rbrundritt commented 6 months ago

Version 3 is just the main map library:

<link rel="stylesheet" href="https://atlas.microsoft.com/sdk/javascript/mapcontrol/3/atlas.min.css" type="text/css">
<script src="https://atlas.microsoft.com/sdk/javascript/mapcontrol/3/atlas.min.js"></script>

Each module has its own version since they are managed separately. Note that the latest version of each major version of the main map control (v1, v2, v3) work with all the modules. So no need to worry about those versions too much, although using the latest versions of those of course will have the most improvements/bug fixes.

For background, here are the main breaking changes that occurred between the major versions, that justified there being a major version number:

A changelog of the minor versions from V2 on is available here: https://learn.microsoft.com/en-us/azure/azure-maps/release-notes-map-control

DavidThielen commented 6 months ago

I'm using version 3 with no problems (so far). But I leave it to someone who knows this code well to decide if they want to change the documentation and samples to use the latest versions.

And leaving this open as I think it all should be updated.