First fetch your map anchor points:

const mapAnchorPoints = await api.fetchMapAnchorPoints(locationID, floorID);

Adding an annotation:

convert your latitude and longitude to a screen x/y and update the map with an annotation

const pointLocation = MeridianSDK.latLngToMapPoint(mapAnchorPoints, {lat: 37.38215607501162, lng: -121.98159912048112});

meridianMap.update({
annotations: [
{
type: "point",
x: pointLocation.x,
y: pointLocation.y,
size: 32,
backgroundColor: "red",
backgroundImage: MeridianSDK.placemarkIconURL("generic")
},
],
});

Adding a polygon:

polygons are created using an array of coordinate arrays - convert your lat/lng points to x/y points

const polygonArray = [];

function coordinateObjectToArray({lat, lng}) {
const coordObject = MeridianSDK.latLngToMapPoint(mapAnchorPoints, {lat, lng});
return [coordObject.x, coordObject.y];
}

then push your x/y coordinate arrays to a polygon array

polygonArray.push(coordinateObjectToArray({lat: 37.38217476738073, lng: -121.98124592380535}));

polygonArray.push(coordinateObjectToArray({lat: 37.38215630276508, lng: -121.98099902518736}));

polygonArray.push(coordinateObjectToArray({lat: 37.382049361776645, lng: -121.98100870748611}));

polygonArray.push(coordinateObjectToArray({lat: 37.382145531737166, lng: -121.98124592380535}));

update your overlay points with your polygon array

meridianMap.update({
overlays: [
{
type: "polygon",
points: polygonArray,
fillOpacity: "15%",
},
],
});