Link to the most recent version of MapKit JS or a version of your choice.
MapKit JS follows semantic versioning with each release. This means that you as the developer have full control over when to upgrade to a new version of MapKit JS. Each version follows the standard semantic versioning pattern
MAJOR which conveys the following information:
MAJOR: Incompatible API changes
MINOR: New functionality, but backward-compatible
PATCH: Backward-compatible bug fixes
In other words, a backward-compatible new release that contains only bug fixes increases the patch version; a backward-compatible new release that contains new features or functionality increases the minor version. And a new release that changes the API so it is no longer backward-compatible increases the major version.
Add a Script Tag
You can link to MapKit JS by adding a
script tag to your web page, as shown here:
The value of the
src attribute of this
URLs that return a specific version
URLs that return the latest available version for the specified MAJOR and MINOR version
Link to a Specific Version of MapKit JS
Each version of MapKit JS has a unique URL. You can link to a version to guarantee that your web page will always use the version of MapKit JS specified. Here are a few examples of
script tags that link to a specific version:
Link to the Latest Available Version of MapKit JS
To always link to the latest available version of MapKit JS, use a URL in your
script tag that specifies "x" for the MINOR and PATCH fields of the version number. Using "x" ensures your web page receives the latest backward-compatible features and bug fixes without having to change the mapkit.js URL in your code.
For example, linking to version 5.1.x means that the MAJOR.MINOR version is pinned at 5.1, and the server automatically returns the latest PATCH version of mapkit.js.
Linking to version 5.x.x means that the MAJOR version is pinned at 5, and the server automatically returns the latest MINOR.PATCH version. Linking to the latest major version of mapkit.js by using version number 5.x.x is recommended.