green3g / cmv-widgets

Dojo Widgets to extend the functionality of CMV
https://roemhildtg.github.io/cmv-widgets/
MIT License
19 stars 29 forks source link

Time Slider #19

Closed kcarrier closed 9 years ago

kcarrier commented 9 years ago

I was hoping you could provide me with some direction. I am not able to get TimeSlider to show, nothing comes up when I grunt the app.

  1. Created a folder called TimeSlider under dijit folder, added TimeSlider.js into that folder.
  2. Added Time Aware Layer to app.
  3. viewer.js - Added this code.
bottom: {
                id: 'sidebarBottom',
                placeAt: 'outer',
                splitter: true,
                collapsible: true,
                region: 'bottom',
                style: 'height:300px;display:block;',
                content: '<div id="timeSlider" style="height:100%;"></div>'
            },
            timeSlider: {
                include: true,
                id: 'timeSlider',
                type: 'domNode',
                srcNodeRef: 'timeSlider',
                path: 'gis/dijit/TimeSlider',
                title: 'Time Slider',
                options: {
                    map: true,
                    startTime: new Date('1/1/2001'),
                    endTime: new Date('1/1/2015'),
                    timeInterval: 1,
                    timeIntervalUnits: 'esriTimeUnitsYears'
                }
            }
green3g commented 9 years ago

@kcarrier As you described it to me, you created a folder and placed the file in there, so the path as you have it set up should be: path: 'gis/dijit/TimeSlider/TimeSlider'. Alternatively, move the TimeSlider.js into gis/dijit/ folder. Let me know if that fixes it.

If you check your chrome dev tools or firefox firebug (F12) you'll probably see an error that the file isn't getting included. The path in your timeslider config should point to the TimeSlider.js file, but without the .js extension.

tmcgee commented 9 years ago

@roemhildtg I resolved the widget not showing up with @kcarrier in gitter.im chat. The pane configuration was missing so no bottom pane.

green3g commented 9 years ago

Thanks @tmcgee !