Skip to content

Instantly share code, notes, and snippets.

@ca0v
Created April 17, 2015 13:18
Show Gist options
  • Save ca0v/d186cdf3757fa4f84725 to your computer and use it in GitHub Desktop.
Save ca0v/d186cdf3757fa4f84725 to your computer and use it in GitHub Desktop.
H8 ConfigTypes
declare module "H8/ConfigTypes" {
interface IMapDrawerDatasetsConfigElement {
DatasetsElement: IMapDrawerDatasetsElement;
PreferencesElement: IMapDrawerPreferencesElement;
DatasetGroupsElement: IMapDrawerDatasetGroupsElement;
DatasetLevelsElement: IMapDrawerDatasetsLevelsElement;
DatasetToolsElement: IMapDrawerToolsConfigElement;
TileCacheUrl: string;
JsMixin: string;
JsLoad: string;
JsLoaded: string;
JsReady: string;
EngineType: enums.MapEngineType;
EsriJavascriptApiUrl: string;
GoogleMapsUrl: string;
GeometryServiceUrl: string;
OpenLayersProj4JsUrl: string;
OpenLayersDojoApiUrl: string;
OpenLayersApiUrl: string;
BingMapsKey: string;
GoogleMapsKey: string;
}
interface IMapDrawerDatasetsElement {
Datasets: Array<IMapDrawerDatasetElement>;
ProviderName: string;
Name: string;
SpatialReference: string;
FullMinX: number;
FullMinY: number;
FullMaxX: number;
FullMaxY: number;
InitMinX: number;
InitMinY: number;
InitMaxX: number;
InitMaxY: number;
MaxFeatureCount: number;
MaxQueryCount: number;
RadiusAroundMarker: number;
MarkerEdgeDistance: number;
FeatureIDField: string;
GeometryField: string;
TileExtension: string;
MaxZoom: number;
OverlapDelta: number;
LinearUnit: string;
OnDemandTiles: boolean;
CacheTiles: boolean;
}
interface IMapDrawerDatasetElement {
Alias: string;
Name: string;
DataLinkField: string;
DataFilterField: string;
DataFilterValue: string;
Groups: string;
FeatureType: MapFeatureType;
Moniker: string;
CacheURL: string;
CacheUrlType: string;
RefreshInterval: number;
LayerType: string;
Opacity: number;
FeatureIDField: string;
GeometryField: string;
MinZoom: number;
MaxZoom: number;
}
enum MapFeatureType {
none = 0,
point = 1,
area = 2,
linear = 3,
image = 4,
}
interface IMapDrawerPreferencesElement {
Maps: Array<IMapDrawerMapElement>;
}
interface IMapDrawerMapElement {
Prefs: Array<IMapDrawerPrefElement>;
PrefType: MapPrefType;
Name: string;
}
interface IMapDrawerPrefElement {
Dataset: string;
State: MapObjectState;
}
enum MapObjectState {
none = 0,
on = 1,
off = 2,
na = 3,
}
enum MapPrefType {
none = 0,
main = 1,
custom = 2,
overview = 3,
group = 4,
legend = 5,
role = 6,
}
interface IMapDrawerDatasetGroupsElement {
Groups: Array<IMapDrawerGroupElement>;
}
interface IMapDrawerGroupElement {
ID: string;
Display: string;
Base: string;
AccessID: number;
}
interface IMapDrawerDatasetsLevelsElement {
LODS: Array<IMapDrawerLevelOfDetailElement>;
}
interface IMapDrawerLevelOfDetailElement {
Level: number;
Resolution: number;
Scale: number;
}
interface IMapDrawerToolsConfigElement {
AnnotationTool: IMapDrawerAnnotationsConfigElement;
}
interface IMapDrawerAnnotationsConfigElement {
service: string;
cdn: string;
FeatureViewers: IMapDrawerAnnotationFeatureViewersElement;
FieldInfos: IMapDrawerAnnotationFieldInfosElement;
Filter: IMapDrawerAnnotationFilterElement;
Labeling: IMapDrawerAnnotationLabelElement;
Inspector: IMapDrawerAnnotationInspectorElement;
Mappings: IMapDrawerAnnotationFieldMappingsElement;
Picker: IMapDrawerAnnotationPickerElement;
Ext: IMapDrawerExtElement;
}
interface IMapDrawerAnnotationLabelElement {
color: string;
offset: string;
size: string;
useServerInfo: boolean;
template: string;
}
interface IMapDrawerAnnotationInspectorElement {
fieldOrder: string;
disableStatusValue: string;
showDeleteButton: boolean;
showDisableButton: boolean;
showDisabledFeatures: boolean;
showEditButton: boolean;
showFadeButton: boolean;
showFlashButton: boolean;
showRevertButton: boolean;
showGeometryButton: boolean;
showActivateMarkerButton: boolean;
autoSelectIfOnlyOneMarker: boolean;
closable: boolean;
collapsible: boolean;
disabled: boolean;
title: string;
toggleKeys: string;
}
interface IMapDrawerAnnotationFeatureViewersElement {
FeatureViewers: Array<IMapDrawerAnnotationFeatureViewerElement>;
}
interface IMapDrawerAnnotationFeatureViewerElement {
allowPan: boolean;
allowZoom: boolean;
sort: boolean;
showFilter: boolean;
showAll: boolean;
showIcons: boolean;
groupby: string;
fields: string;
nullText: string;
closable: boolean;
collapsible: boolean;
disabled: boolean;
title: string;
toggleKeys: string;
}
interface IMapDrawerAnnotationFieldInfosElement {
FieldInfos: Array<IMapDrawerAnnotationFieldInfoElement>;
}
interface IMapDrawerAnnotationFieldInfoElement {
name: string;
alias: string;
default: string;
separator: string;
keywords: string;
autoSelect: boolean;
sticky: boolean;
renderer: enums.MapDrawerAnnotationInspectorRendererEnum;
h8type: enums.HansenFieldMapEnum;
readonly: boolean; // esri uses editable but default of false makes that awkward
disabled: boolean;
hidden: boolean;
}
interface IMapDrawerAnnotationFilterElement {
fieldOrder: string;
showObjectID: boolean;
showSpatialFilterButton: boolean;
showGlobalFilterButton: boolean;
showZoomToFeaturesButton: boolean;
showIncludeExpiredFilterButton: boolean;
closable: boolean;
collapsible: boolean;
disabled: boolean;
title: string;
toggleKeys: string;
nullText: string;
}
interface IMapDrawerAnnotationFieldMappingsElement {
Mappings: Array<IMapDrawerAnnotationFieldMappingElement>;
}
interface IMapDrawerAnnotationFieldMappingElement {
FieldMap: Array<IMapDrawerAnnotationFieldMappingMapElement>;
name: string;
}
interface IMapDrawerAnnotationFieldMappingMapElement {
name: string;
template: string;
}
interface IMapDrawerAnnotationPickerElement {
keepSelected: boolean;
accordion: boolean;
grouping: boolean;
showFilter: boolean;
showFadeButton: boolean;
closable: boolean;
collapsible: boolean;
disabled: boolean;
title: string;
toggleKeys: string;
}
interface IMapDrawerExtElement {
Values: Array<IMapDrawerValueElement>;
}
interface IMapDrawerValueElement {
name: string;
value: string;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment