Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OSM Place Search Logger
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ifs
OSM Place Search Logger
Commits
5a859692
Commit
5a859692
authored
1 year ago
by
Ciro Brodmann
Browse files
Options
Downloads
Patches
Plain Diff
fixed (hopefully) the marker symbol on deployment
parent
9b8ab5ef
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#279627
passed with stage
Stage:
in 2 minutes and 7 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
backend/src/app.controller.ts
+2
-2
2 additions, 2 deletions
backend/src/app.controller.ts
frontend/src/LeafletMap.vue
+17
-5
17 additions, 5 deletions
frontend/src/LeafletMap.vue
readme.md
+1
-1
1 addition, 1 deletion
readme.md
with
20 additions
and
8 deletions
backend/src/app.controller.ts
+
2
−
2
View file @
5a859692
...
@@ -32,12 +32,12 @@ export class AppController {
...
@@ -32,12 +32,12 @@ export class AppController {
@
Post
(
'
submit
'
)
@
Post
(
'
submit
'
)
submitResult
(@
Body
()
submit
:
SubmitLog
,
@
Req
()
request
:
Request
):
string
{
submitResult
(@
Body
()
submit
:
SubmitLog
,
@
Req
()
request
:
Request
):
string
{
this
.
logger
.
log
(
'
osm
'
,
{
this
.
logger
.
log
(
'
osm
'
,
{
task
:
'
resultSubmi
t
'
,
task
:
'
resultSubmi
ssion
'
,
clientIp
:
request
.
ip
,
clientIp
:
request
.
ip
,
userAgent
:
request
.
headers
[
'
user-agent
'
],
userAgent
:
request
.
headers
[
'
user-agent
'
],
submitEntry
:
submit
,
submitEntry
:
submit
,
});
});
return
'
Submi
t
request completed
'
;
return
'
Submi
ssion
request completed
'
;
}
}
}
}
This diff is collapsed.
Click to expand it.
frontend/src/LeafletMap.vue
+
17
−
5
View file @
5a859692
...
@@ -23,13 +23,14 @@
...
@@ -23,13 +23,14 @@
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
'
leaflet/dist/leaflet.css
'
import
'
leaflet/dist/leaflet.css
'
import
{
map
as
LFMap
,
tileLayer
,
geoJSON
,
marker
,
Layer
}
from
"
leaflet
"
import
{
map
as
LFMap
,
tileLayer
,
geoJSON
,
marker
,
Layer
,
Icon
}
from
"
leaflet
"
;
import
{
LMap
,
LTileLayer
,
LGeoJson
,
LControlAttribution
,
LMarker
,
LPopup
}
from
'
@vue-leaflet/vue-leaflet
'
import
markerIconPng
from
"
leaflet/dist/images/marker-icon.png
"
;
import
{
ref
,
watch
,
onMounted
,
onBeforeUpdate
,
onUpdated
}
from
'
vue
'
import
markerIconRetinaPng
from
"
leaflet/dist/images/marker-icon-2x.png
"
;
import
markerShadowPng
from
"
leaflet/dist/images/marker-shadow.png
"
;
import
{
ref
,
watch
,
onMounted
,
onUpdated
}
from
'
vue
'
;
import
GeoJsonSearchResult
from
'
./types/geojson-search-result
'
;
import
GeoJsonSearchResult
from
'
./types/geojson-search-result
'
;
import
{
computed
}
from
'
vue
'
;
import
{
computed
}
from
'
vue
'
;
let
zoom
=
2
let
zoom
=
2
interface
LeafletMapProps
{
interface
LeafletMapProps
{
...
@@ -85,6 +86,15 @@ watch(center, () => {
...
@@ -85,6 +86,15 @@ watch(center, () => {
let
map
=
null
let
map
=
null
let
featureLayer
=
null
let
featureLayer
=
null
const
markerIcon
=
new
Icon
({
iconUrl
:
markerIconPng
,
iconRetinaUrl
:
markerIconRetinaPng
,
shadowUrl
:
markerShadowPng
,
iconAnchor
:
[
12
,
41
],
shadowAnchor
:
[
12
,
41
],
popupAnchor
:
[
0
,
-
35
]
});
onMounted
(()
=>
{
onMounted
(()
=>
{
map
=
LFMap
(
"
map
"
).
setView
(
center
.
value
,
zoom
);
map
=
LFMap
(
"
map
"
).
setView
(
center
.
value
,
zoom
);
...
@@ -124,7 +134,9 @@ onUpdated(() => {
...
@@ -124,7 +134,9 @@ onUpdated(() => {
map
.
removeLayer
(
featureLayer
)
map
.
removeLayer
(
featureLayer
)
featureLayer
=
new
geoJSON
(
props
.
poi
as
any
,
{
featureLayer
=
new
geoJSON
(
props
.
poi
as
any
,
{
pointToLayer
:
function
(
feature
,
latlng
):
Layer
{
pointToLayer
:
function
(
feature
,
latlng
):
Layer
{
return
marker
(
latlng
);
return
marker
(
latlng
,
{
icon
:
markerIcon
});
},
},
onEachFeature
:
function
(
feature
,
layer
)
{
onEachFeature
:
function
(
feature
,
layer
)
{
const
url
=
`https://www.openstreetmap.org/
${
feature
.
properties
.
osm_type
}
/
${
feature
.
properties
.
osm_id
}
`
const
url
=
`https://www.openstreetmap.org/
${
feature
.
properties
.
osm_type
}
/
${
feature
.
properties
.
osm_id
}
`
...
...
This diff is collapsed.
Click to expand it.
readme.md
+
1
−
1
View file @
5a859692
...
@@ -72,7 +72,7 @@ A log for a submission differs slightly. Here's how that one's structured:
...
@@ -72,7 +72,7 @@ A log for a submission differs slightly. Here's how that one's structured:
"clientIp"
:
string
,
//
the
client's
IP
address
"clientIp"
:
string
,
//
the
client's
IP
address
"level"
:
string
,
//
the
log
level
,
see
`log
level`
further
below
in
this
readme
"level"
:
string
,
//
the
log
level
,
see
`log
level`
further
below
in
this
readme
"submitEntry"
:
submitEntry
//
contains
the
same
fields
as
the
API
call
to
/submit
"submitEntry"
:
submitEntry
//
contains
the
same
fields
as
the
API
call
to
/submit
"task"
:
"resultSubmi
t
"
,
//
a
string
description
of
the
type
of
log
this
is
"task"
:
"resultSubmi
ssion
"
,
//
a
string
description
of
the
type
of
log
this
is
"timestamp"
:
string
,
//
the
time
this
log
was
created
at
"timestamp"
:
string
,
//
the
time
this
log
was
created
at
"userAgent"
:
string
//
the
client's
user
agent
"userAgent"
:
string
//
the
client's
user
agent
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment