Skip to content

Instantly share code, notes, and snippets.

@feedhenry-gists
feedhenry-gists / gist:1016466
Created June 9, 2011 10:14
Mapping Example HTML5 Version
<!-- 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();">
@feedhenry-gists
feedhenry-gists / gist:1016462
Created June 9, 2011 10:07
Mapping Example Server Side Placemarks
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'});
@feedhenry-gists
feedhenry-gists / gist:1016460
Created June 9, 2011 10:06
Mapping Example Showing Placemarks
$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
@feedhenry-gists
feedhenry-gists / gist:1016459
Created June 9, 2011 10:05
Mapping Example Showing
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
@feedhenry-gists
feedhenry-gists / gist:1016440
Created June 9, 2011 09:46
App Anatomy theme.css
p {
color: white;
}
a{
color: #2879c7;
}
body {
background-image: linear-gradient(bottom, rgb(38,43,50) 24%, rgb(3,3,3) 5%);
@feedhenry-gists
feedhenry-gists / gist:1016437
Created June 9, 2011 09:45
App Anatomy theme2 package
/client
/theme2/
/css
/theme.css
/img
/background.png
/button_sprite.png
/logo.png
@feedhenry-gists
feedhenry-gists / gist:1016435
Created June 9, 2011 09:44
App Anatomy prefs.js
var prefs = {
menu_container : '#top2',
logo_container : '#top1',
reload_container : '#bottom1'
}
@feedhenry-gists
feedhenry-gists / gist:1016434
Created June 9, 2011 09:43
App Anatomy bottom_nav Package
/client
/default
/js
/prefs.js
@feedhenry-gists
feedhenry-gists / gist:1016432
Created June 9, 2011 09:42
App Anatomy Default Package
/client
/default/
/index.html
/css
/main.css
/theme.css
/img
/background.png
/button_sprite.png
/cloud.png
var url = http://www.example.com;
$fh.webview({'url':url, 'title':"hello"},
function(result){alert(result)},
function(result){alert(result)});