Add current location button to geo search

This commit is contained in:
vita10gy
2013-04-13 00:33:46 -05:00
parent 5f4e0192a0
commit 4f26a6e68d
4 changed files with 19 additions and 1 deletions

View File

@ -23,4 +23,7 @@ window.setupGeosearch = function() {
}); });
e.preventDefault(); e.preventDefault();
}); });
$('#geosearchwrapper img').click(function(){
map.locate({setView : true});;
});
} }

BIN
images/current-location.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -85,7 +85,10 @@ document.getElementsByTagName('body')[0].innerHTML = ''
+ ' <div id="sidebar" style="display: none">' + ' <div id="sidebar" style="display: none">'
+ ' <div id="playerstat">t</div>' + ' <div id="playerstat">t</div>'
+ ' <div id="gamestat">&nbsp;loading global control stats</div>' + ' <div id="gamestat">&nbsp;loading global control stats</div>'
+ ' <input id="geosearch" placeholder="Search location…" type="text"/>' + ' <div id="geosearchwrapper">'
+ ' <input id="geosearch" placeholder="Search location…" type="text"/>'
+ ' <img src="@@INCLUDEIMAGE:images/current-location.png@@"/>'
+ ' </div>'
+ ' <div id="portaldetails"></div>' + ' <div id="portaldetails"></div>'
+ ' <input id="redeem" placeholder="Redeem code…" type="text"/>' + ' <input id="redeem" placeholder="Redeem code…" type="text"/>'
+ ' <div id="toolbox">' + ' <div id="toolbox">'

View File

@ -423,6 +423,18 @@ input {
box-sizing: border-box; box-sizing: border-box;
} }
#geosearch{
width:272px;
background-color: transparent;
}
#geosearchwrapper {
height:25px;
background-color: rgba(0, 0, 0, 0.3);
}
#geosearchwrapper img{
vertical-align: bottom;
margin-bottom: 2px;
}
::-webkit-input-placeholder { ::-webkit-input-placeholder {
font-style: italic; font-style: italic;
} }