To communicate with Maps services, you’ll need to set up your Maps identifiers, keys, and tokens by signing in to your developer account and visiting Certificates, Identifiers & Profiles.
The MapKit JS beta provides a daily free limit of 250,000 map initializations and 25,000 service calls. Services included in the free limit are Search, Search Autocomplete, Directions, and Geocoding. If your team's needs exceed the free limit, you can request a capacity increase.
You can find examples and sample code at the link below.