diff --git a/README.md b/README.md index f890505..64c2f6d 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,8 @@ A simple yet configurable disclaimer widget. --- ### Elevation Profile -An updated Elevation Profile widget based on previously contributed widget by [goriliukasbuxton](https://github.com/goriliukasbuxton/ElevationProfile2) and [ERS-Long](https://github.com/ERS-Long/ElevationsProfile). +An updated Elevation Profile widget based on previously contributed widgets by [goriliukasbuxton](https://github.com/goriliukasbuxton/ElevationProfile2) and [ERS-Long](https://github.com/ERS-Long/ElevationsProfile). +##### [Demo](http://tmcgee.github.io/cmv-widgets/demo.html?config=elevationProfile) ##### [Widget](https://github.com/tmcgee/cmv-widgets/tree/master/widgets/ElevationProfile.js) --- @@ -97,6 +98,7 @@ A simple widget to toggle the visibility of a set of layers. Only a single layer --- ### Locator Control A widget to allow the user to change the properties of the CMV Locate Button widget in real-time. +##### [Demo](http://tmcgee.github.io/cmv-widgets/demo.html?config=locatorControl) ##### [Widget](https://github.com/tmcgee/cmv-widgets/tree/master/widgets/LocatorControl.js) --- diff --git a/config/elevationprofile.js b/config/elevationprofile.js new file mode 100644 index 0000000..29d004c --- /dev/null +++ b/config/elevationprofile.js @@ -0,0 +1,77 @@ +define({ + isDebug: false, + + mapOptions: { + basemap: 'topo', + center: [-120.0417, 39.0917], + zoom: 10, + sliderStyle: 'small' + }, + + titles: { + header: 'CMV Elevation Profile Example', + subHeader: 'This is an example of using the Elevation Profile widget', + pageTitle: 'CMV Elevation Profile Widget' + }, + + collapseButtonsPane: 'center', //center or outer + + panes: { + bottom: { + id: 'sidebarBottom', + placeAt: 'outer', + splitter: true, + collapsible: true, + region: 'bottom', + open: 'none', // using false doesn't work + style: 'height: 350px', + content: '
' + } + }, + + operationalLayers: [], + + widgets: { + growler: { + include: true, + id: 'growler', + type: 'domNode', + path: 'gis/dijit/Growler', + srcNodeRef: 'growlerDijit', + options: {} + }, + elevationProfile: { + include: true, + type: 'titlePane', + path: 'widgets/ElevationProfile', + canFloat: true, + title: 'Elevation Profile', + iconClass: 'fa fa-fw fa-area-chart', + open: true, + position: 0, + options: { + map: true + } + }, + + attributesTable: { + include: true, + id: 'attributesContainer', + type: 'domNode', + srcNodeRef: 'attributesContainer', + path: 'widgets/AttributesTable', + options: { + map: true, + mapClickMode: true, + + // use a tab container for multiple tables or + // show only a single table + useTabs: true, + + // used to open the sidebar after a query has completed + sidebarID: 'sidebarBottom' + } + } + + } +}); diff --git a/config/locatorControl.js b/config/locatorControl.js new file mode 100644 index 0000000..9b6dd52 --- /dev/null +++ b/config/locatorControl.js @@ -0,0 +1,70 @@ +define({ + isDebug: false, + + mapOptions: { + basemap: 'streets', + center: [-96.59179687497497, 39.09596293629694], + zoom: 5, + sliderStyle: 'small' + }, + + titles: { + header: 'CMV Locator Control Widget', + subHeader: 'This is an example of using the Locator Control widget', + pageTitle: 'CMV Locator Conntrol Widget' + }, + + panes: { + left: { + collapsible: false, + style: 'display:none' + } + }, + collapseButtonsPane: 'center', //center or outer + + operationalLayers: [], + + widgets: { + growler: { + include: true, + id: 'growler', + type: 'domNode', + path: 'gis/dijit/Growler', + srcNodeRef: 'growlerDijit', + options: {} + }, + locateButton: { + include: true, + id: 'locateButton', + type: 'domNode', + path: 'gis/dijit/LocateButton', + srcNodeRef: 'homeButton', + options: { + map: true, + scale: 1000, + highlightLocation: true, + useTracking: false, + clearOnTrackingStop: true, + geolocationOptions: { + maximumAge: 0, + timeout: 5000, + enableHighAccuracy: true + } + } + }, + locatorControl: { + include: true, + id: 'locatorControl', + type: 'floating', + path: 'widgets/LocatorControl', + title: 'Locator Settings', + iconClass: 'fa-compass', + preload: true, + options: { + html: '', + domTarget: 'locateButton', + openOnStartup: true + } + } + } +}); diff --git a/index.html b/index.html index 4bd12f6..b403726 100644 --- a/index.html +++ b/index.html @@ -87,8 +87,10 @@

Disclaimer

Elevation Profile

-

An updated Elevation Profile widget based on previously contributed widget by [goriliukasbuxton](https://github.com/goriliukasbuxton/ElevationProfile2) and [ERS-Long](https://github.com/ERS-Long/ElevationsProfile).

-

+

An updated Elevation Profile widget based on previously contributed widgets bygoriliukasbuxton and ERS-Long.

+

+ Demo +



@@ -164,7 +166,9 @@

Layer Toggle

Locator Control

A widget to allow the user to change the properties of the CMV Locate Button widget in real-time.

-

+

+ Demo +



diff --git a/widgets/LocatorControl.js b/widgets/LocatorControl.js index e30cd5f..050a446 100644 --- a/widgets/LocatorControl.js +++ b/widgets/LocatorControl.js @@ -42,7 +42,7 @@ define([ i18n: i18n, baseClass: 'cmwLocatorControlWidget', - html: '', + html: '', domTarget: 'helpDijit', draggable: true,