การลงเวลา Map
This commit is contained in:
parent
293250ac03
commit
efce8f7204
1 changed files with 7 additions and 6 deletions
|
|
@ -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
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue