Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Adjusted look of latlon switch (taller button)

Taylor Gunnoe1c597cd7a035
diff --git a/web/css/wv.map.css b/web/css/wv.map.css
index abfac73e8..86297f4c6 100644
--- a/web/css/wv.map.css
+++ b/web/css/wv.map.css
@@ -89,7 +89,7 @@
position: absolute;
top: auto;
right: 10px;
- bottom: 95px;
+ bottom: 85px;
white-space: pre;
outline: none;
color: #fff;
@@ -100,43 +100,47 @@
background: none;
display:none;
cursor:pointer;
- height:19px;
- line-height:19px;
- padding:0 2px 0 5px;
+ height:35px;
+ padding:0 0 0 5px;
}
.wv-coords-map:hover{
background:rgba(40,40,40,0.85);
}
-.wv-coords-map div.map-coord{
+.wv-coords-map:hover div.coord-btn{
+ background-image:none;
+ background:#fff;
+}
+.wv-coords-map:hover div.coord-btn i{
+ background-position:0;
+}
+.wv-coords-map span.map-coord{
display:none !important;
- line-height:19px;
- margin-top:-5px;
- height: 19px;
+ line-height:35px;
+ float:left;
+ height: 35px;
vertical-align: middle;
}
-.wv-coords-map div.map-coord.latlon-selected{
+.wv-coords-map span.map-coord.latlon-selected{
display:inline-block !important;
}
.wv-coords-map div.coord-btn{
position:relative;
- width:16px;
- height:15px;
- background:linear-gradient(#fcfcfc, #eee) #eee;
- border:1px solid #d5d5d5;
+ width:20px;
+ height:35px;
+ background:rgba(40,40,40,0.85);
+ border:1px solid transparent;
display:inline-block;
margin-left:5px;
cursor:pointer;
padding:1px;
box-sizing:border-box;
- margin-top:2px;
-
}
.wv-coords-map div.coord-btn:hover{
background-image:none;
background:#fff;
}
.wv-coords-map div.coord-btn:hover i{
- background-position:-14px 0;
+ background-position:0;
}
.wv-coords-map div.coord-btn i{
position:absolute;
@@ -147,5 +151,6 @@
width:14px;
height:13px;
background:url('../images/map/latlon.png') no-repeat;
+ background-position:-14px;
}
\ No newline at end of file
diff --git a/web/images/map/latlon.png b/web/images/map/latlon.png
index 84c8003e4..9dbd704e3 100644
Binary files a/web/images/map/latlon.png and b/web/images/map/latlon.png differ
diff --git a/web/js/map/wv.map.ui.js b/web/js/map/wv.map.ui.js
index 16776d02a..9c612f474 100644
--- a/web/js/map/wv.map.ui.js
+++ b/web/js/map/wv.map.ui.js
@@ -539,21 +539,22 @@ wv.map.ui = wv.map.ui || function(models, config) {
$map.append($mousePosition);
- var $latlonDD = $("<div></div>")
+ var $latlonDD = $("<span></span>")
.attr('id', mapId + '-latlon-dd')
.attr('data-format', 'latlon-dd')
.addClass('map-coord');
- var $latlonDMS = $("<div></div>")
+ var $latlonDMS = $("<span></span>")
.attr('id', mapId + '-latlon-dms')
.attr('data-format', 'latlon-dms')
.addClass('map-coord');
+
if ( wv.util.getCoordinateFormat() === "latlon-dd" ) {
- $latlonDMS.hide().removeClass('lanlon-selected');
- $latlonDD.show().addClass('latlon-selected');
+ $('div.map-coord').removeClass('latlon-selected');
+ $latlonDD.addClass('latlon-selected');
} else {
- $latlonDD.hide().removeClass('latlon-selected');
- $latlonDMS.show().addClass('latlon-selected');
+ $('div.map-coord').removeClass('latlon-selected');
+ $latlonDMS.addClass('latlon-selected');
}
var $coordBtn = $("<i></i>")
.addClass('coord-switch');
@@ -570,12 +571,12 @@ wv.map.ui = wv.map.ui || function(models, config) {
var $format = $(this).find(".latlon-selected");
if($format.attr("data-format") === "latlon-dd"){
- $('div.map-coord').removeClass('latlon-selected');
+ $('span.map-coord').removeClass('latlon-selected');
$latlonDMS.addClass('latlon-selected');
wv.util.setCoordinateFormat('latlon-dms');
}
else{
- $('div.map-coord').removeClass('latlon-selected');
+ $('span.map-coord').removeClass('latlon-selected');
$latlonDD.addClass('latlon-selected');
wv.util.setCoordinateFormat('latlon-dd');
}
@@ -591,7 +592,7 @@ wv.map.ui = wv.map.ui || function(models, config) {
})
.mousemove(function(e){
var coords = map.getCoordinateFromPixel([e.pageX,e.pageY]);
- $('#' + mapId + ' div.map-coord').each(function(){
+ $('#' + mapId + ' span.map-coord').each(function(){
var format = $(this).attr('data-format');
$(this).html(coordinateFormat(coords, format));
});