Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PyBusMap
Manage
Activity
Members
Labels
Plan
Issues
10
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
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
Anton Sarukhanov
PyBusMap
Commits
1e09f3a9
Commit
1e09f3a9
authored
9 years ago
by
Anton Sarukhanov
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup crud, add geolocation.
parent
9b6bb256
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
static/css/map.css
+17
-0
17 additions, 0 deletions
static/css/map.css
static/css/style.css
+0
-4
0 additions, 4 deletions
static/css/style.css
static/img/crosshair.png
+0
-0
0 additions, 0 deletions
static/img/crosshair.png
templates/map.html
+14
-1
14 additions, 1 deletion
templates/map.html
with
31 additions
and
5 deletions
static/css/
full-page-
map.css
→
static/css/map.css
+
17
−
0
View file @
1e09f3a9
...
...
@@ -21,6 +21,23 @@ html, body {
color
:
#ff0
;
}
/* Map Buttons */
#locate
{
position
:
absolute
;
bottom
:
10px
;
left
:
10px
;
}
#locate
a
{
text-decoration
:
none
;
}
#locate
a
img
{
background-color
:
#222
;
border-radius
:
50%
;
border
:
2px
solid
#666
;
padding
:
0.4em
;
height
:
1.5em
;
}
/* Embed Mode - Hide UI stuff */
#map
.embed
.leaflet-control
{
display
:
none
;
...
...
This diff is collapsed.
Click to expand it.
static/css/style.css
deleted
100644 → 0
+
0
−
4
View file @
9b6bb256
body
{
padding-top
:
50px
;
padding-bottom
:
30px
;
}
This diff is collapsed.
Click to expand it.
static/img/crosshair.png
0 → 100644
+
0
−
0
View file @
1e09f3a9
1.41 KiB
This diff is collapsed.
Click to expand it.
templates/map.html
+
14
−
1
View file @
1e09f3a9
...
...
@@ -8,7 +8,7 @@
<link
href=
"bower/leaflet/dist/leaflet.css"
rel=
"stylesheet"
/>
<link
href=
"bower/leaflet.markercluster/dist/MarkerCluster.Default.css"
rel=
"stylesheet"
/>
<link
href=
"bower/Leaflet.label/dist/leaflet.label.css"
rel=
"stylesheet"
/>
<link
href=
"static/css/
full-page-
map.css"
rel=
"stylesheet"
/>
<link
href=
"static/css/map.css"
rel=
"stylesheet"
/>
{% endblock %}
{% block body %}
<div
id=
"map"
class=
"{% if embed %}embed{% endif %}"
></div>
...
...
@@ -67,6 +67,9 @@
<div
id=
"msg"
>
<span
id=
"msg-zoomForVehicles"
>
Zoom in to see vehicles.
</span>
</div>
<div
id=
"locate"
>
<a
href=
"javascript:void(0);"
><img
src=
"static/img/crosshair.png"
alt=
"Locate"
></a>
</div>
<script
src=
"bower/leaflet/dist/leaflet.js"
></script>
<script
src=
"bower/Leaflet.label/dist/leaflet.label.js"
></script>
<script
src=
"bower/leaflet.markercluster/dist/leaflet.markercluster.js"
></script>
...
...
@@ -110,5 +113,15 @@
}
BusMap
.
setCookie
(
'
been_here
'
,
Date
.
now
());
// Find the user
map
.
leaflet
.
on
(
'
locationfound
'
,
function
(
l
)
{
map
.
leaflet
.
fitBounds
(
l
.
bounds
);
});
$
(
"
#locate a
"
).
click
(
function
()
{
map
.
leaflet
.
locate
({
timeout
:
3000
,
});
});
</script>
{% endblock %}
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