ADD: Utm Convert
FIX: Features data not saving and not loading
This commit is contained in:
@@ -40,21 +40,40 @@ const props = defineProps({
|
||||
modelValue: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
lon: {
|
||||
type: Number
|
||||
},
|
||||
lat: {
|
||||
type: Number
|
||||
}
|
||||
});
|
||||
|
||||
const emit = defineEmits(['update:modelValue']);
|
||||
|
||||
// Map configuration
|
||||
const zoom = ref(13);
|
||||
const zoom = ref(12);
|
||||
const center = ref([31.3183, 48.6706]);
|
||||
const attribution = ref('© OpenStreetMap contributors');
|
||||
const attribution = ref('Nilgoon Team');
|
||||
const marker = ref([...props.modelValue]);
|
||||
const map = ref(null);
|
||||
|
||||
// Search functionality
|
||||
const searchQuery = ref('');
|
||||
|
||||
const searchByCoordinates = (lat, lon) => {
|
||||
if (lat && lon) {
|
||||
center.value = [parseFloat(lat), parseFloat(lon)];
|
||||
zoom.value = 10;
|
||||
marker.value = [parseFloat(lat), parseFloat(lon)];
|
||||
emit('update:modelValue', marker.value);
|
||||
}
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
searchByCoordinates
|
||||
});
|
||||
|
||||
const handleSearch = async () => {
|
||||
if (!searchQuery.value) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user