mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-09 22:04:43 +00:00
Open in another app generates geo: URI with a q= query compatible with Google Maps
Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
committed by
Konstantin Pastbin
parent
30718e106e
commit
972cefb074
@@ -107,6 +107,8 @@ std::string GenerateGeoUri(double lat, double lon, double zoom, std::string cons
|
||||
{
|
||||
std::ostringstream oss;
|
||||
oss << "geo:" << std::fixed << std::setprecision(7) << lat << ',' << lon << "?z=" << std::setprecision(1) << zoom;
|
||||
// For Google Maps compatibility, otherwise it doesn't select the point on the map, only shows the area.
|
||||
oss << "&q=" << std::setprecision(7) << lat << ',' << lon;
|
||||
|
||||
if (!name.empty())
|
||||
oss << '(' << url::UrlEncode(name) << ')';
|
||||
|
||||
Reference in New Issue
Block a user