Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
MetaGerMaps
Frontend
Commits
a92f38ec
Commit
a92f38ec
authored
8 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Patches
Plain Diff
Wegpunkte werden nun immer direkt vor dem eingegebenen Ziel eingefügt
parent
d2e30de6
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
public/js/findRoute.js
+2
-2
2 additions, 2 deletions
public/js/findRoute.js
public/js/findRoute.js.map
+1
-1
1 addition, 1 deletion
public/js/findRoute.js.map
resources/assets/js/findRoute.js
+16
-3
16 additions, 3 deletions
resources/assets/js/findRoute.js
with
19 additions
and
6 deletions
public/js/findRoute.js
+
2
−
2
View file @
a92f38ec
Source diff could not be displayed: it is too large. Options to address this:
view the blob
.
This diff is collapsed.
Click to expand it.
public/js/findRoute.js.map
+
1
−
1
View file @
a92f38ec
This diff is collapsed.
Click to expand it.
resources/assets/js/findRoute.js
+
16
−
3
View file @
a92f38ec
...
...
@@ -3,7 +3,7 @@
* First thinkg would be to prepare the Results Div
*/
var
vectorLayerRoutePreview
;
var
markers
=
[];
$
(
document
).
ready
(
function
(){
deinitSearchBox
();
initRouteFinder
();
...
...
@@ -39,6 +39,8 @@ function deinitSearchBox(){
function
initRouteFinder
(){
$
(
"
#results
"
).
html
(
""
);
// Remove Existing Markers
clearMarkers
();
var
vehicleChooser
=
$
(
"
<div>
\
...
...
@@ -128,7 +130,8 @@ function initRouteFinder(){
// Add the Listener for adding Waypoints
$
(
"
#add-waypoint
"
).
click
(
function
(){
waypoints
.
push
(
''
);
clearMarkers
();
waypoints
.
splice
(
waypoints
.
length
-
1
,
0
,
''
);
initRouteFinder
();
});
...
...
@@ -166,9 +169,19 @@ function addPositionMarker(lon, lat, index){
// So now the Pin
var
el
=
$
(
'
<span id="
'
+
chr
+
'
" class="marker">
'
+
chr
+
'
</span>
'
);
var
pos
=
ol
.
proj
.
transform
([
parseFloat
(
lon
),
parseFloat
(
lat
)],
'
EPSG:4326
'
,
'
EPSG:3857
'
);
addMarker
(
el
,
pos
);
markers
.
push
(
addMarker
(
el
,
pos
)
)
;
}
/*
* Clears all Markers which are on the map
*/
function
clearMarkers
(){
$
.
each
(
markers
,
function
(
index
,
value
){
map
.
removeOverlay
(
value
);
});
markers
=
[];
}
/*
* Generates Parameter to the Route until this point using the global waypoints variable
* @return{String} QueryParameter
...
...
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