This repository has been archived by the owner on Jul 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move CSS and JavaScript to separate files.
- Loading branch information
WanCW
committed
Apr 8, 2012
1 parent
655bb66
commit 6a56003
Showing
3 changed files
with
75 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
function initialize() { | ||
|
||
function updateMapByCurrentPosition(map, position) { | ||
var coordinates = position.coords; | ||
var currentLocation = new google.maps.LatLng( | ||
coordinates.latitude, coordinates.longitude); | ||
map.setCenter(currentLocation); | ||
var marker = new google.maps.Marker({ | ||
position: currentLocation, | ||
map: map | ||
}); | ||
} | ||
|
||
function getCurrentLocation(map) { | ||
if (navigator.geolocation) { | ||
var gl = navigator.geolocation; | ||
gl.getCurrentPosition(function(p){ | ||
updateMapByCurrentPosition(map,p)}); | ||
} | ||
} | ||
|
||
var myOptions = { | ||
center: new google.maps.LatLng(-34.397, 150.644), | ||
zoom: 18, | ||
mapTypeId: google.maps.MapTypeId.ROADMAP | ||
}; | ||
|
||
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); | ||
getCurrentLocation(map); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
body { | ||
height: 100%; margin: 0; padding: 0; | ||
font-family: 'Helvetica Neue', HelveticaNeue, Helvetica, Arial, 'Lucida Grande', sans-serif; | ||
} | ||
|
||
a { color: #08C; text-decoration: none; } | ||
a:hover, a:active { outline: 0; } | ||
a:hover { color: #005580; text-decoration: underline; } | ||
|
||
.container { margin: 0 auto; width: 1170px; } | ||
.row { margin-left: -30px; } | ||
.row::before, .row::after { display: table; content: ""; } | ||
.row::after { clear: both; } | ||
|
||
[class*="span"] { float: left; margin-left: 30px; } | ||
.span1 { width: 70px; } | ||
.span2 { width: 170px; } | ||
.span3 { width: 270px; } | ||
.span4 { width: 370px; } | ||
.span8 { width: 770px; } | ||
.span12 { width: 1170px;} | ||
|
||
.button { | ||
background-color: #E6E6E6; | ||
border-width: 1px; | ||
border-radius: 4px; | ||
font-size: 14px; | ||
} | ||
|
||
#map_canvas { height: 480px; border: solid 1px #999; } | ||
#map_hints { color: #666; } | ||
|
||
#device_list { list-style: none; margin: 0; padding: 0; } | ||
#device_list li { padding: 5px 0; } | ||
|
||
#footer { | ||
margin-top: 15px; | ||
padding: 24px 0; | ||
color: #999; | ||
text-align: center; | ||
border-top: 1px solid #CCC; | ||
} |