Skip to content

Replace reverse geolocation server #75

@markuman

Description

@markuman

Currently gpxpod is using nominatim.openstreetmap.org for geolocation search

  • public function nominatimSearch(
    string $q, string $rformat = 'json', ?int $polygon_geojson = null, ?int $addressdetails = null,
    ?int $namedetails = null, ?int $extratags = null, int $limit = 10,
    ): DataResponse {
    $extraParams = [
    'polygon_geojson' => $polygon_geojson,
    'addressdetails' => $addressdetails,
    'namedetails' => $namedetails,
    'extratags' => $extratags,
    ];
    $searchResults = $this->mapService->searchLocation($this->userId, $q, $rformat, $extraParams, 0, $limit);
    if (isset($searchResults['error'])) {
    return new DataResponse('', Http::STATUS_BAD_REQUEST);
    }
    $response = new DataResponse($searchResults);
    $response->cacheFor(60 * 60 * 24, false, true);
    return $response;
    }
    }
  • https://github.com/julien-nc/gpxpod/blob/main/lib/Service/MapService.php#L338

Image

It would be nice if it is possible to provide another reverse geolocation server. Such as https://github.com/rtuszik/photon-docker

Image

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions