Skip to content

Commit

Permalink
PB-494: Fix getCode and use currently active projection.
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsunni committed Jun 6, 2024
1 parent f1e4fd1 commit 8ad4ffa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/modules/map/components/cesium/CesiumMouseTracker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ function setupHandler() {
const longitude = Math.toDegrees(cartographic.longitude)
const latitude = Math.toDegrees(cartographic.latitude)
// Transform to web mercator
let coordinate = transform([longitude, latitude], 'EPSG:4326', 'EPSG:3857')
let coordinate = transform([longitude, latitude], 'EPSG:4326', projection.value)
window.projection = projection.value
coordinate.push(cartographic.height)
mousePosition.value.textContent = formatCoordinate(coordinate)
Expand Down
2 changes: 1 addition & 1 deletion src/utils/coordinates/CoordinateSystem.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,6 @@ export default class CoordinateSystem {
* @returns {Number}
*/
getCode() {
return this.epsgNumber
return `EPSG:${this.epsgNumber}`
}
}

0 comments on commit 8ad4ffa

Please sign in to comment.