[MapKit JS] How to show different map type in JS?

Hi,


question how above: how to set a different type of map than the default in JS? I saw in documentation "mapkit.Map.MapTypes" but I don't know how to use it.

Replies

Try

myMap.mapType = mapkit.Map.MapTypes.Satellite;


where myMap is the Map object on your page. The full list of map types is at https://developer.apple.com/documentation/mapkitjs/mapkit/map/maptypes


You can also use the strings that these constants are mapped to, for example:


myMap.mapType = "satellite";