Fix report location not showing up.
This commit is contained in:
parent
947ece00f1
commit
fd86281a7e
2 changed files with 3 additions and 6 deletions
|
|
@ -17,7 +17,7 @@ import (
|
|||
"github.com/Gleipnir-Technology/nidus-sync/db/sql"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/html"
|
||||
"github.com/go-chi/chi/v5"
|
||||
//"github.com/rs/zerolog/log"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/stephenafamo/scan"
|
||||
/*
|
||||
"github.com/Gleipnir-Technology/nidus-sync/db"
|
||||
|
|
@ -160,7 +160,7 @@ func contentFromNuisance(ctx context.Context, report_id string) (result ContentS
|
|||
sm.Columns(
|
||||
psql.F("ST_AsGeoJSON", "location"),
|
||||
),
|
||||
sm.From("publicreport.quick"),
|
||||
sm.From("publicreport.nuisance"),
|
||||
sm.Where(psql.Quote("public_id").EQ(psql.Arg(report_id))),
|
||||
), scan.SingleColumnMapper[string])
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -49,10 +49,7 @@ function onLoad() {
|
|||
center: GEOJSON_LOCATION.coordinates,
|
||||
zoom: 14,
|
||||
});
|
||||
map.addMarker(GEOJSON_LOCATION.coordinates, "#00FF00");
|
||||
GEOJSON_IMAGE_LOCATIONS.forEach((image) => {
|
||||
map.addMarker(image.coordinates, "#FF0000");
|
||||
});
|
||||
map.addMarker(GEOJSON_LOCATION.coordinates, "#DC3545");
|
||||
});
|
||||
}
|
||||
document.addEventListener("DOMContentLoaded", onLoad);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue