diff --git a/go.mod b/go.mod index b89fa5e..1e6c588 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,8 @@ require ( github.com/jessevdk/go-flags v1.5.0 github.com/jmoiron/sqlx v1.3.5 github.com/lab5e/go-spanapi/v4 v4.4.1 - github.com/lab5e/gotileserver v0.0.3 + github.com/lab5e/gotileserver v1.0.0 + github.com/lab5e/osm-trondheim v1.0.0 github.com/stretchr/testify v1.8.2 google.golang.org/genproto v0.0.0-20230327215041-6ac7f18bb9d5 google.golang.org/grpc v1.54.0 diff --git a/go.sum b/go.sum index c0d964d..126f322 100644 --- a/go.sum +++ b/go.sum @@ -140,8 +140,10 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/lab5e/go-spanapi/v4 v4.4.1 h1:lADGYku+0eoZ2LSl80JqX3VMty9hqSE22I3nNso1mEM= github.com/lab5e/go-spanapi/v4 v4.4.1/go.mod h1:lTEIqK1ApjzDBMXYe77EPeQHkxK43wYQaRWq7iQbrmU= -github.com/lab5e/gotileserver v0.0.3 h1:7h7CnKYJh+JAbDcyaAp920uybDZBvCwydUo6+QYOTUc= -github.com/lab5e/gotileserver v0.0.3/go.mod h1:ELcWmRsG3n1NFua7YN+qKjsIcsXpz18RiEhA0uscLJs= +github.com/lab5e/gotileserver v1.0.0 h1:XxjPkp0cX7OdKSjT3kDPTsjo5NLq09v27hHnc5u6SRA= +github.com/lab5e/gotileserver v1.0.0/go.mod h1:KolLUrVtLwF6wQHGp5BDZbHfmw0jT3q7Xy7lgf5ZHeU= +github.com/lab5e/osm-trondheim v1.0.0 h1:7vcrUd7/5sYFwhK1SA6iWf0o5KUByL9jn65/J87jny0= +github.com/lab5e/osm-trondheim v1.0.0/go.mod h1:ec+WJhk5xGHsI7AQ52Ded/u/e76bDsYsRJHvu/iDHiA= github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= diff --git a/pkg/server/http.go b/pkg/server/http.go index 64114f4..c69e0d9 100644 --- a/pkg/server/http.go +++ b/pkg/server/http.go @@ -12,6 +12,7 @@ import ( "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/lab5e/gotileserver" + osmtrondheim "github.com/lab5e/osm-trondheim" "github.com/lab5e/pax/doc" "github.com/lab5e/pax/frontend" paxv1 "github.com/lab5e/pax/pkg/pax/v1" @@ -49,7 +50,7 @@ func (s *Server) startHTTP() error { httpMux := http.NewServeMux() - gotileserver.RegisterHandler(httpMux, s.config.TileServerURL) + gotileserver.RegisterHandler(httpMux, s.config.TileServerURL, osmtrondheim.TrondheimOSMTiles()) mux.PathPrefix("/map").Handler(httpMux) mux.PathPrefix("/").Handler(http.FileServer(http.FS(frontendFS)))