การลงเวลา Map

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-11-11 18:05:42 +07:00
parent 293250ac03
commit efce8f7204

View file

@ -2,9 +2,9 @@
import { ref, watch } from "vue";
import { loadModules } from "esri-loader";
const apiKey = ref<string>(
"AAPK4f700a4324d04e9f8a1a134e0771ac45FXWawdCl-OotFfr52gz9XKxTDJTpDzw_YYcwbmKDDyAJswf14FoPyw0qBkN64DvP"
);
// const apiKey = ref<string>(
// "YLATgWuywoeRLHn6KImj5rg7UaP8bJoR9jiTldoCVBHlqFIebwMSA5wIXEmcYhwXwMHkmNISEYtUz3x0oiGIIx0bIXXnUwi0OzupoOEtDrQIsRPVtor7gaPpXEmH8TrNaMT3snf6zO_yujHLGzborg"
// );
const props = defineProps({
modal: {
type: Boolean,
@ -33,9 +33,10 @@ async function initializeMap(lat: number, long: number) {
"esri/Graphic",
]);
// Set apiKey
esriConfig.apiKey = apiKey.value;
// esriConfig.apiKey = apiKey.value;
const map = new Map({
basemap: "arcgis-topographic",
// basemap: "arcgis-topographic",
basemap: "streets",
});
const point = new Point({
@ -51,7 +52,7 @@ async function initializeMap(lat: number, long: number) {
latitude: lat,
longitude: long,
}, // Set the initial map center current position
zoom: 16,
zoom: 18,
ui: {
components: [], // Empty array to remove all default UI components
},