diff --git a/uvdat/core/rest/serializers.py b/uvdat/core/rest/serializers.py index 7544c0c6..bf4a438a 100644 --- a/uvdat/core/rest/serializers.py +++ b/uvdat/core/rest/serializers.py @@ -67,7 +67,7 @@ def to_internal_value(self, data): center = data.get('default_map_center') data = super().to_internal_value(data) if isinstance(center, list): - data['default_map_center'] = Point(*center) + data['default_map_center'] = Point(center[1], center[0]) return data class Meta: diff --git a/web/src/storeFunctions.ts b/web/src/storeFunctions.ts index 58d0290f..8b324d25 100644 --- a/web/src/storeFunctions.ts +++ b/web/src/storeFunctions.ts @@ -103,7 +103,7 @@ export function getCurrentMapPosition() { let center = [0, 0]; let zoom = map.getZoom(); const centerLngLat = map.getCenter(); - if (centerLngLat) center = [centerLngLat.lat, centerLngLat.lng]; + if (centerLngLat) center = [centerLngLat.lng, centerLngLat.lat]; if (zoom) zoom = Math.floor(zoom); else zoom = 1; return { center, zoom };