This includes code for geocoding, building a map, and getting the user's location.
26 lines
415 B
Go
26 lines
415 B
Go
package publicreport
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/Gleipnir-Technology/nidus-sync/config"
|
|
"github.com/Gleipnir-Technology/nidus-sync/htmlpage"
|
|
)
|
|
|
|
type ContextSearch struct {
|
|
MapboxToken string
|
|
}
|
|
|
|
var (
|
|
Search = buildTemplate("search", "base")
|
|
)
|
|
|
|
func getSearch(w http.ResponseWriter, r *http.Request) {
|
|
htmlpage.RenderOrError(
|
|
w,
|
|
Search,
|
|
ContextSearch{
|
|
MapboxToken: config.MapboxToken,
|
|
},
|
|
)
|
|
}
|