Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VIPS Observation App DEPRECATED
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIPS
VIPS Observation App DEPRECATED
Commits
5a0092bb
Commit
5a0092bb
authored
4 years ago
by
Bhabesh Bhabani Mukhopadhyay
Browse files
Options
Downloads
Patches
Plain Diff
Get Point of interests of logged in user
parent
0723d8f9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/CommonUtil.vue
+1
-0
1 addition, 0 deletions
src/components/CommonUtil.vue
src/components/MapObservation.vue
+52
-15
52 additions, 15 deletions
src/components/MapObservation.vue
with
53 additions
and
15 deletions
src/components/CommonUtil.vue
+
1
−
0
View file @
5a0092bb
...
@@ -33,6 +33,7 @@ export default {
...
@@ -33,6 +33,7 @@ export default {
CONST_URL_CROP_PEST_LIST
:
'
/rest/organism/crop/pest/list
'
,
CONST_URL_CROP_PEST_LIST
:
'
/rest/organism/crop/pest/list
'
,
CONST_URL_USER_OBSERVATION_LIST
:
'
/rest/observation/list/user
'
,
CONST_URL_USER_OBSERVATION_LIST
:
'
/rest/observation/list/user
'
,
CONST_URL_USER_POI
:
'
/rest/poi/user
'
,
CONST_GPS_URL_NORWAY_MAP
:
'
https://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?Version=1.0.0&service=wmts&request=getcapabilities
'
,
CONST_GPS_URL_NORWAY_MAP
:
'
https://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?Version=1.0.0&service=wmts&request=getcapabilities
'
,
...
...
This diff is collapsed.
Click to expand it.
src/components/MapObservation.vue
+
52
−
15
View file @
5a0092bb
...
@@ -6,16 +6,16 @@
...
@@ -6,16 +6,16 @@
<div
id=
"ObservationMapPanel"
v-if=
"isMyMapPanelVisible"
ref=
'ObservationMapPanel'
>
<div
id=
"ObservationMapPanel"
v-if=
"isMyMapPanelVisible"
ref=
'ObservationMapPanel'
>
<div>
<div>
<input
value=
""
placeholder=
"name"
>
<!--
<input
value=
""
placeholder=
"name"
>
<br>
<br>
-->
<select>
<select
v-model=
"poi.pointOfInterestId"
v-on:change=
"selectPOI($event)"
>
<option
>
Select test 1
</option>
<option
v-for=
"poi in lstPOI"
v-bind:value=
"poi.pointOfInterestId"
>
{{
poi
.
name
}}
</option>
</select>
</select>
<br>
<!--
<br>
<select>
<select>
<option>
Select test 2
</option>
<option>
Select test 2
</option>
</select>
</select>
-->
</div>
</div>
</div>
</div>
<div
v-else
>
<div
v-else
>
...
@@ -59,12 +59,14 @@ export default {
...
@@ -59,12 +59,14 @@ export default {
props
:
[
'
geoinfo
'
,
'
isMapPanelVisible
'
],
props
:
[
'
geoinfo
'
,
'
isMapPanelVisible
'
],
data
(){
data
(){
return
{
return
{
isMyMapPanelVisible
:
''
,
isMyMapPanelVisible
:
''
,
myGeoInfo
:
''
,
myGeoInfo
:
''
,
latitude
:
0
,
latitude
:
0
,
longitude
:
0
,
longitude
:
0
,
mapZoom
:
0
,
mapZoom
:
0
,
mapInteractions
:
''
,
mapInteractions
:
''
,
lstPOI
:
[],
poi
:
{
pointOfInterestId
:
''
,
name
:
'
Select POI
'
}
}
}
},
},
methods
:
{
methods
:
{
...
@@ -84,7 +86,7 @@ export default {
...
@@ -84,7 +86,7 @@ export default {
//let styleFunction = this.myStyleFunction(styles,feature);
//let styleFunction = this.myStyleFunction(styles,feature);
//let styleFunction = this.myStyleFunction(styles);
//let styleFunction = this.myStyleFunction(styles);
let
vectorSource
=
this
.
myVectorGeoSource
();
let
vectorSource
=
this
.
myVectorGeoSource
();
//vectorSource.addFeature(new Feature(new Circle([5e6, 7e6], 1e6)));
//vectorSource.addFeature(new Feature(new Circle([5e6, 7e6], 1e6)));
let
vectorGeoLayer
=
this
.
myVectorGeoLayer
(
vectorSource
);
let
vectorGeoLayer
=
this
.
myVectorGeoLayer
(
vectorSource
);
...
@@ -249,7 +251,39 @@ export default {
...
@@ -249,7 +251,39 @@ export default {
myInteractions
(
mapInteractions
)
myInteractions
(
mapInteractions
)
{
{
return
(
mapInteractions
)
?
[]
:
''
;
return
(
mapInteractions
)
?
[]
:
''
;
}
},
getMyPointOfInterst
(
lstPOI
)
{
let
userUUID
=
localStorage
.
getItem
(
CommonUtil
.
CONST_STORAGE_UUID
);
let
jsonHeader
=
{
Authorization
:
userUUID
};
lstPOI
.
push
({
pointOfInterestId
:
''
,
name
:
'
Select POI
'
});
fetch
(
CommonUtil
.
CONST_URL_DOMAIN
+
CommonUtil
.
CONST_URL_USER_POI
,
{
method
:
"
GET
"
,
headers
:
jsonHeader
,
}).
then
((
response
)
=>
{
if
(
response
.
status
==
200
)
{
return
response
.
json
()
}
})
.
then
((
jsonLstPOI
)
=>
{
$
.
each
(
jsonLstPOI
,
function
(
index
,
poi
){
let
myPOI
=
poi
;
//{'pointOfInterestId':poi.pointOfInterestId,'name':poi.name,'longitude':poi.longitude, 'latitude':poi.latitude};
lstPOI
.
push
(
myPOI
);
})
})
},
selectPOI
(
event
)
{
//let jsonSelectedPest = this.pests.find(({pestId}) => pestId === jsonObservation.organismId);
this
.
poi
=
this
.
lstPOI
.
find
(({
pointOfInterestId
})
=>
pointOfInterestId
===
JSON
.
parse
(
event
.
target
.
value
));
},
},
},
...
@@ -286,7 +320,9 @@ export default {
...
@@ -286,7 +320,9 @@ export default {
appDiv
.
style
.
marginTop
=
"
0
"
;
appDiv
.
style
.
marginTop
=
"
0
"
;
appDiv
.
style
.
paddingRight
=
"
0
"
;
appDiv
.
style
.
paddingRight
=
"
0
"
;
appDiv
.
style
.
paddingLeft
=
"
0
"
;
appDiv
.
style
.
paddingLeft
=
"
0
"
;
this
.
getMyPointOfInterst
(
this
.
lstPOI
);
}
}
else
else
{
{
...
@@ -314,6 +350,7 @@ export default {
...
@@ -314,6 +350,7 @@ export default {
this
.
mapZoom
=
CommonUtil
.
CONST_GPS_DEFAULT_ZOOM
;
this
.
mapZoom
=
CommonUtil
.
CONST_GPS_DEFAULT_ZOOM
;
}
}
this
.
$nextTick
(
function
()
{
this
.
$nextTick
(
function
()
{
this
.
initMap
();
this
.
initMap
();
...
...
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