This file contains hidden or 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
interface MapDrawerDatasetsConfigElement { | |
DatasetsElement?: MapDrawerDatasetsElement; | |
PreferencesElement?: MapDrawerPreferencesElement; | |
DatasetGroupsElement?: MapDrawerDatasetGroupsElement; | |
DatasetLevelsElement?: MapDrawerDatasetsLevelsElement; | |
DatasetToolsElement?: MapDrawerToolsConfigElement; | |
TileCacheUrl?: string; | |
JsMixin?: string; | |
JsLoad?: string; | |
JsLoaded?: string; |
This file contains hidden or 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
// Type definitions for OpenLayers.js 2.10 | |
// Project: https://github.com/openlayers/openlayers | |
// Definitions by: Ilya Bolkhovsky <https://github.com/bolhovsky> | |
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | |
declare namespace OpenLayers { | |
export const INCHES_PER_UNIT: any; | |
export var ProxyHost: string; | |
This file contains hidden or 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
<Maplet text="Civics Instrument List Maplet" id="rhythm-civics-instrument-list" about="Maplet configuration for Civics Instument List" parentId="toolbar"> | |
<MAP> | |
<SYMBOLOGY> | |
<SYMBOL label="<%= computedDescription %>" id="*" template="app/templates/civics-infoviewer-template"> | |
<ICON id="ServiceRequest.png"> | |
<FILTERS> | |
<FILTER id="_dataType" value="serviceRequest" /> | |
</FILTERS> | |
</ICON> | |
<ICON id="Planning_Application.png"> |
This file contains hidden or 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
/** | |
* http://sampleserver6.arcgisonline.com/arcgis/sdk/rest/index.html#/Network_Layer/02ss0000009p000000/ | |
*/ | |
class Route { | |
private ajax: Ajax; | |
constructor(url: string) { | |
this.ajax = new Ajax(url); | |
} | |
This file contains hidden or 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
/** | |
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise | |
*/ | |
class Ajax { | |
constructor (public url) { | |
} | |
// Method that performs the ajax request | |
private ajax(method, args?, url = this.url) { |
This file contains hidden or 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
/************************************************* | |
* see http://resources.esri.com/help/9.3/arcgisengine/ArcObjects/esrinetworkanalyst/INACompactStreetDirection_CompressedGeometry.htm | |
*************************************************/ | |
class DecompressGeometry { | |
public ExtractPointsFromCompressedGeometry(compresedGeometry: string) | |
{ | |
// initialize result storage | |
let result = <Array<{x: number; y: number;}>>[], | |
nIndex = {ref: 0}, |
This file contains hidden or 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
enum Move { | |
down = 0, | |
right = 1, | |
up = 2, | |
left = 3 | |
} | |
class Fractal { | |
constructor(public points = [Move.down, Move.right, Move.up]) { |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"> | |
<title></title> | |
<link rel="stylesheet" href="//js.arcgis.com/3.14/esri/css/esri.css"> | |
<style> | |
html, body, #map { | |
height: 100%; width: 100%; margin: 0; padding: 0; |
This file contains hidden or 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
/* | |
create a class for every child namespace | |
create an typeof attribute to simulate an inner class. | |
*/ | |
var YUI: Liferay.YUI; | |
var Y = YUI(); | |
Y = YUI({ |
This file contains hidden or 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 merge(key: string, ...arrays: Array<any>[]) { | |
// skip trivial arrays | |
arrays = arrays.filter(a => !!a && 0 < a.length); | |
var result = arrays.shift(); | |
if (!arrays.length) return result; | |
var hash = {}; result.forEach((item, i) => hash[item.id] = i); | |
arrays.forEach(array => { |