I'm working with MapKit JS for the first time. I'm using the 'Annotations With a Custom Callout' sample code as my starting point as my map will need to work in a similar way to this one.
I've got the basics working but I would now like to specify the center coordinates for the map but can't get this to work and not sure of the correct syntax.
For example if I wanted that map to centre around these coordinates:
(37.8184493, -122.478409)
I'm not sure where/how to specify these. I've tried adding:
var center = new mapkit.Coordinate(37.8184493, -122.478409);
after:
const map = new mapkit.Map("map");
but this doesn't change how the map is displayed. Appreciate if someone can show me where/how to specify the center coordinates for this type of map.