画像




マーカーを表示するメモ。




画像




main.ts

import './style.css'
import 'maplibre-gl/dist/maplibre-gl.css';
import maplibregl from 'maplibre-gl';
import { createMap, drawPoints } from "maplibre-gl-js-amplify";
import { Amplify } from 'aws-amplify';
import awsconfig from './aws-exports';
Amplify.configure(awsconfig);

async function mapCreate() {
const map = await createMap({
container: 'map',
center: [139.767, 35.681],
zoom: 11,
});
map.addControl(
new maplibregl.NavigationControl({
visualizePitch: true,
})
);
map.on('load', function () {
// マーカー表示
drawPoints('pointsSource', [{ coordinates: [139.7648, 35.6794] }], map);
});
}
mapCreate();






Amazon Location Serviceを手軽に始めるビルド環境公開しています。
amazon-location-service-starter





book


Q&A