I’m using MapKit JS to plot markers on a Map – so far so good. I’ve noticed that it doesn’t show the Suburb name for the location of the marker so far in my testing. Here’s an example
The marker is located in Hornsby which isn’t showing on the map. If I move the market to an adjacent suburb Wahroonga I get the following:
Now Wahroonga isn’t showing but Hornsby is showing. I’m trying to find if there’s a control that determines when the suburb for the marker is shown or not but haven’t been able to find anything so far.
Here’s the code for my map if that helps:
const main = async() => {
await setupMapKitJs();
// Create the Map and Geocoder
const map = new mapkit.Map("map-container");
const geocoder = new mapkit.Geocoder({ language: "en-US" });
// Create the "Marker" annotation, setting properties in the constructor.
const event = new mapkit.Coordinate(-33.7015776, 151.0960029);
const eventAnnotation = new mapkit.MarkerAnnotation(event, {
color: "red",
title: "",
glyphText: ""
});
// Add and show both annotations on the map
map.showItems([eventAnnotation]);
};
main();