Skip to content

Instantly share code, notes, and snippets.

@zkkmin
zkkmin / 0_reuse_code.js
Created June 2, 2016 02:45
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@media screen and (min-width: 1000px){
.container {
width: 1000px;
margin-left: auto;
margin-right: auto;
height: 800px;
}
.map {
height: 700px;
@media screen and (min-width: 800px){
.container2 {
width :40%;
}
.map {
width : 60%;
}
function ZoomTo(xVal, yVal) {
// Remove the class open from divResults,
// so that it will slide back out of view
var drawer = document.getElementById("divResults");
drawer.classList.toggle('open');
///
OneMap.showLocation(xVal, yVal);
}
function displayData(resultData) {
var results = resultData.results;
if (results == 'No results') {
document.geElementById('divResults').innerHTML = "No result(s) found";
return false
}
else {
// Set the divResults class as open to slide in from off screen
var drawer = document.getElementById("divResults");
drawer.classList.toggle('open');
/* set padding and height to 100% */
html, body, #mapDiv {
padding: 0;
margin: 0;
height: 100%;
font-family: sans-serif;
}
/* use flex and flex-wrap */
.container {
<div class="container">
<div class="box heading">
<h2>Address Search API Usage (WGS84 Coordinate System)</h2>
</div>
<div class="box container2">
<div class="box searchbox">
<input type="text" id="txtSearchText" value='City Hall' />
<input type="button" onclick="GetSearchData();" value="Search" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<table style="width: 436px">
<tr>
<th colspan="2">
Address Search API Usage (WGS84 Coordinate System)
</th>
</tr>
<tr>
<td>
Search Text :
</td>
var resultTableViewController = UITableViewController()
var searchController = UISearchController()