mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 08:44:04 +01:00
Places: Expand GPS coordinates if they represent a point or line #3953
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -390,6 +390,7 @@ export default {
|
|||||||
|
|
||||||
this.getClusterFeatures(clusterId, -1, (clusterFeatures) => {
|
this.getClusterFeatures(clusterId, -1, (clusterFeatures) => {
|
||||||
let latNorth, lngEast, latSouth, lngWest;
|
let latNorth, lngEast, latSouth, lngWest;
|
||||||
|
|
||||||
for (const feature of clusterFeatures) {
|
for (const feature of clusterFeatures) {
|
||||||
const [lng, lat] = feature.geometry.coordinates;
|
const [lng, lat] = feature.geometry.coordinates;
|
||||||
if (latNorth === undefined || lat > latNorth) {
|
if (latNorth === undefined || lat > latNorth) {
|
||||||
@@ -406,6 +407,18 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Expand the GPS coordinates if they represent a point or line:
|
||||||
|
// https://github.com/photoprism/photoprism/issues/3953
|
||||||
|
if (latNorth === latSouth) {
|
||||||
|
latNorth = latNorth + 0.0003;
|
||||||
|
latSouth = latSouth - 0.0003;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lngEast === lngWest) {
|
||||||
|
lngEast = lngEast + 0.0003;
|
||||||
|
lngWest = lngWest - 0.0003;
|
||||||
|
}
|
||||||
|
|
||||||
this.selectClusterByCoords(latNorth, lngEast, latSouth, lngWest);
|
this.selectClusterByCoords(latNorth, lngEast, latSouth, lngWest);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user