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
<!-- Styles --> | |
<link type="text/css" rel="stylesheet" href="css/style.css"/> | |
<div id="main"> | |
<div id="header"> | |
<h1 id="header_title">Mapping Example</h1> | |
</div> | |
<div id="content"> | |
<input type="button" value="Show Placemarks" onclick="map.show();"> |
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
function getPlacemarks() { | |
var lat = 'undefined' !== typeof $params.lat ? $params.lat : 53.4, | |
lon = 'undefined' !== typeof $params.lon ? $params.lon : -7.4; | |
// Add the passed in location to a points array | |
var points = [{lat: lat, lon: lon, title: 'My Placemark!'}]; | |
// Push some more closeby points onto the array | |
points.push({lat: lat + 0.002, lon: lon - 0.002, title: 'Top Left'}); | |
points.push({lat: lat + 0.002, lon: lon, title: 'Top Middle'}); |
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
$fh.act({ | |
act: 'getPlacemarks', | |
req: { | |
lat: lat, | |
lon: lon | |
} | |
}, function (res) { | |
var points = res.points; | |
// Iterate over the points array, adding each to the 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
show: function () { | |
var lat = 52.88, | |
lon = -7.96; | |
//Pass lat & lon into map api, initialising map at that point | |
$fh.map({ | |
target: '#maps_div', | |
lat: lat, | |
lon: lon, | |
zoom: 15 |
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
p { | |
color: white; | |
} | |
a{ | |
color: #2879c7; | |
} | |
body { | |
background-image: linear-gradient(bottom, rgb(38,43,50) 24%, rgb(3,3,3) 5%); |
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
/client | |
/theme2/ | |
/css | |
/theme.css | |
/img | |
/background.png | |
/button_sprite.png | |
/logo.png |
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
var prefs = { | |
menu_container : '#top2', | |
logo_container : '#top1', | |
reload_container : '#bottom1' | |
} |
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
/client | |
/default | |
/js | |
/prefs.js |
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
/client | |
/default/ | |
/index.html | |
/css | |
/main.css | |
/theme.css | |
/img | |
/background.png | |
/button_sprite.png | |
/cloud.png |
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
var url = http://www.example.com; | |
$fh.webview({'url':url, 'title':"hello"}, | |
function(result){alert(result)}, | |
function(result){alert(result)}); |