Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
autorensystem
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
MOTIVATE
autorensystem
Commits
082c8e11
Commit
082c8e11
authored
9 years ago
by
hjank
Browse files
Options
Downloads
Patches
Plain Diff
# moved re-centering and re-zooming of the map into replaceMarker()
# adjusted getParameterInput() to changes in DOM
parent
ba4e7a7c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
js/authoring/controllers/tabs/contextTabController.js
+14
-22
14 additions, 22 deletions
js/authoring/controllers/tabs/contextTabController.js
js/authoring/controllers/tabs/locationInfoMapViewController.js
+4
-0
4 additions, 0 deletions
...thoring/controllers/tabs/locationInfoMapViewController.js
with
18 additions
and
22 deletions
js/authoring/controllers/tabs/contextTabController.js
+
14
−
22
View file @
082c8e11
...
...
@@ -530,9 +530,6 @@ function fillParameterSelection(cp) {
if
(
chosenValue
!=
""
)
{
var
latlng
=
new
google
.
maps
.
LatLng
(
lat
,
long
);
replaceMarker
(
latlng
);
// center the map and set zoom factor
map
.
setCenter
(
latlng
);
map
.
setOptions
({
zoom
:
15
});
}
// in any case where coordinates are expected
...
...
@@ -741,30 +738,25 @@ function getParameterInput(val, num) {
/* get values from inputs and set the marker on this point in google maps */
// TODO: if ... coordinates expected
var
lat
,
long
;
var
lngInputDiv
=
$
(
"
#divMaps
"
).
prev
();
var
latInputDiv
=
$
(
lngInputDiv
).
prev
();
if
(
$
(
"
#divContextParameter
"
).
find
(
"
#divMaps
"
).
length
>
0
)
{
// check if latitude is not empty
if
(
$
(
"
#inputContextParameter1
"
).
val
())
{
lat
=
$
(
latInputDiv
).
children
(
"
input
"
)[
0
].
value
;
}
var
lat
,
long
;
var
lngInputDiv
=
$
(
"
#divMaps
"
).
prev
();
var
latInputDiv
=
$
(
lngInputDiv
).
prev
();
// check if longitude is not empty
if
(
$
(
"
#inputContextParameter2
"
).
val
())
{
long
=
$
(
"
#inputContextParameter2
"
).
val
();
}
// check if latitude is not empty
lat
=
$
(
latInputDiv
).
children
(
"
input
"
)[
0
].
value
;
// only if both inputs have a value set marker
if
(
$
(
"
#inputContextParameter1
"
).
val
()
&&
$
(
"
#inputContextParameter2
"
).
val
())
{
var
new_LatLong
=
new
google
.
maps
.
LatLng
(
lat
,
long
);
// check if longitude is not empty
long
=
$
(
lngInputDiv
).
children
(
"
input
"
)[
0
].
value
;
// replace old marker and set the new one
replaceMarker
(
new_LatLong
);
// only if both inputs have a value set marker
if
(
lat
&&
long
)
{
var
new_LatLong
=
new
google
.
maps
.
LatLng
(
lat
,
long
);
// center the map and set zoom factor
map
.
setCent
er
(
new_LatLong
);
map
.
setOptions
({
zoom
:
15
});
// replace old marker and set the new one
replaceMark
er
(
new_LatLong
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
js/authoring/controllers/tabs/locationInfoMapViewController.js
+
4
−
0
View file @
082c8e11
...
...
@@ -346,4 +346,8 @@ function replaceMarker(location) {
icon
:
image
,
shadow
:
shadow
});
// center the map and set zoom factor
map
.
setCenter
(
location
);
map
.
setOptions
({
zoom
:
15
});
}
\ No newline at end of file
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