Merge pull request #154 from vita10gy/location

Add current location button to geo search
This commit is contained in:
Jon Atkins 2013-04-14 07:14:11 -07:00
commit 2f5b117998
4 changed files with 19 additions and 1 deletions

View File

@ -23,4 +23,7 @@ window.setupGeosearch = function() {
});
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="playerstat">t</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>'
+ ' <input id="redeem" placeholder="Redeem code…" type="text"/>'
+ ' <div id="toolbox">'

View File

@ -423,6 +423,18 @@ input {
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 {
font-style: italic;
}