View gist:204909
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
OpenLayers.Format.GeoRSS.prototype.createFeatureFromItem: function(item) { | |
var geometry = this.createGeometryFromItem(item); | |
/* Provide defaults for title and description */ | |
var title = this.getChildValue(item, "*", "title", this.featureTitle); | |
/* First try RSS descriptions, then Atom summaries */ | |
var description = this.getChildValue( | |
item, "*", "description", | |
this.getChildValue(item, "*", "content", |
View Data.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
case 'mixed': | |
// The URL of the Image pinpoint icon is fetched from the 'url' | |
// property of the Feature | |
var mixedUrl = (feature.attributes.url) ? feature.attributes.url : ''; | |
var mixedWidth = (feature.attributes.width) ? feature.attributes.width : ''; | |
var mixedHeight = (feature.attributes.height) ? feature.attributes.height : ''; | |
var mixedShadowUrl = (feature.attributes.shadowUrl) ? feature.attributes.shadowUrl : ''; | |
var mixedShadowXOffset = (feature.attributes.shadowXOffset) ? feature.attributes.shadowXOffset : ''; | |
var mixedShadowYOffset = (feature.attributes.shadowYOffset) ? feature.attributes.shadowYOffset : ''; |
View gist:208286
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
/** | |
* Method: createFeatureFromItem | |
* Return a feature from a GeoRSS Item. | |
* | |
* Parameters: | |
* item - {DOMElement} A GeoRSS item node. | |
* | |
* Returns: | |
* {<OpenLayers.Feature.Vector>} A feature representing the item. | |
*/ |
View gist:216790
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
N | |
NW + NE | |
+ NNW + NNE + | |
+ + + | |
WNW + + + ENE | |
+ + + | |
W +++++++++++++++++++++++ E | |
+ + + | |
WSW + + + ESE |
View Activate the Timeout Rainbow.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
(function ( selector ) { | |
Array.prototype.slice.call( document.querySelectorAll( selector ) ) | |
.forEach( function(it) { | |
it.className += " selected"; | |
}); | |
})(".nav-facet li, #leftHandNavMenu li"); |
View test.rb
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
require 'rubygems' | |
gem "selenium-client",">1.2.9" | |
require "selenium/client" | |
browser = Selenium::Client::Driver.new \ | |
:host => "localhost", | |
:port => 4444, | |
:browser => "*firefox", | |
:url => "http://www.google.com", |
View tile_naming_algorithms.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
var mapBounds = new OpenLayers.Bounds( -20037508.34, -20037508.34, | |
20037508.34, 20037508.34); | |
/* | |
Converts TMS tile coordinates to Microsoft QuadTree. | |
*/ | |
function tmsToQuadTree(/* int */ tx, /* int */ ty, /* int */ zoom) { | |
var quadKey = []; | |
// ISSUE: When using VirtualEarth or Google, need to put a '0' before the quadkey |
View test_hash_function.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
var Hash = { | |
/** | |
* Constant: URL_HASH_FACTOR | |
* {Float} Used to hash URL param strings for multi-WMS server selection. | |
* Set to the Golden Ratio per Knuth's recommendation. | |
*/ | |
URL_HASH_FACTOR: (Math.sqrt(5) - 1) / 2, | |
/** | |
* Method: selectUrl | |
* selectUrl() implements the standard floating-point multiplicative |
View gist:634483
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 KEEP = true, | |
DISCARD = false, | |
items = this.container.get( slotClass ).filter( | |
function ( item ) { | |
return glow.dom.get( this ).hasClass( inactiveClass ) ? DISCARD : KEEP ; | |
} | |
); |
View gist:666125
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
1) Save the text below as /features/support/pie_chart_formatter.rb | |
2) Run cucumber -f PieChartFormatter | |
That spits out a URL with your scenario stats | |
----- | |
class PieChartFormatter | |
def initialize(step_mother, io, options) | |
@io = io |
OlderNewer