-
-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
136 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
define([ | ||
'dojo/_base/declare', | ||
'dijit/_WidgetBase', | ||
'dijit/_TemplatedMixin', | ||
'dijit/_WidgetsInTemplateMixin', | ||
|
||
'dojo/_base/lang', | ||
'dojo/topic', | ||
|
||
'esri/dijit/BasemapGallery', | ||
|
||
'dojo/text!./BasemapGallery/templates/BasemapGallery.html', | ||
'dojo/i18n!./BasemapGallery/nls/resource', | ||
|
||
'dijit/layout/ContentPane', | ||
'dijit/TitlePane', | ||
|
||
'xstyle/css!./BasemapGallery/css/BasemapGallery.css' | ||
|
||
], function ( | ||
declare, | ||
_WidgetBase, | ||
_TemplatedMixin, | ||
_WidgetsInTemplateMixin, | ||
|
||
lang, | ||
topic, | ||
|
||
BasemapGallery, | ||
|
||
template, | ||
i18n | ||
) { | ||
|
||
return declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], { | ||
widgetsInTemplate: true, | ||
templateString: template, | ||
i18n: i18n, | ||
baseClass: 'cmvBasemapGalleryWidget', | ||
|
||
galleryOptions: { | ||
showArcGISBasemaps: true | ||
}, | ||
|
||
postCreate: function () { | ||
this.inherited(arguments); | ||
|
||
var opts = lang.mixin({ | ||
map: this.map | ||
}, this.galleryOptions || {}); | ||
this.basemapGallery = new BasemapGallery(opts, 'basemapGallery'); | ||
this.basemapGallery.startup(); | ||
|
||
this.basemapGallery.on('selection-change', lang.hitch(this, 'basemapSelected')); | ||
|
||
this.basemapGallery.on('error', function (msg) { | ||
topic.publish('viewer/handleError', 'basemap gallery error: ' + msg); | ||
}); | ||
}, | ||
|
||
basemapSelected: function (/* basemap */) { | ||
this.basemapGalleryTitlePane.set('open', false); | ||
} | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
.cmvBasemapGalleryWidget .dijitTitlePane { | ||
border-radius: 4px; | ||
} | ||
|
||
.cmvBasemapGalleryWidget .dijitTitlePaneTitle { | ||
border-color: #BBB; | ||
padding: 4px; | ||
} | ||
|
||
.cmvBasemapGalleryWidget .dijitTitlePane .dijitArrowNode { | ||
float: right; | ||
padding-top: 3px; | ||
} | ||
|
||
.cmvBasemapGalleryWidget .dijitTitlePaneTextNode:before { | ||
content: '\f009'; | ||
font-family: FontAwesome; | ||
} | ||
|
||
.cmvBasemapGalleryWidget .dijitTitlePaneContentOuter { | ||
border-color: #BBB; | ||
} | ||
|
||
.cmvBasemapGalleryWidget .dijitTitlePaneContentInner { | ||
padding: 0; | ||
} | ||
|
||
.cmvBasemapGalleryWidget .basemapGalleryContent { | ||
height: 280px; | ||
overflow:auto; | ||
width: 410px; | ||
} | ||
.cmvBasemapGalleryWidget .esriBasemapGalleryNode { | ||
margin: 5px 15px; | ||
} | ||
|
||
@media screen and (max-width: 767px) { | ||
.cmvBasemapGalleryWidget .basemapGalleryContent { | ||
width: 140px; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
define ({ | ||
title: 'Mapas base' | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
define ({ | ||
title: 'Fond de carte' | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
define ({ | ||
title: 'Mapas base' | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
define({ | ||
title: 'Mapas base' | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
define ({ | ||
root: { | ||
title: 'Basemaps' | ||
}, | ||
'es': true, | ||
'fr': true, | ||
'pt-br': true, | ||
'pt-pt': true | ||
}); |
7 changes: 7 additions & 0 deletions
7
viewer/js/gis/dijit/BasemapGallery/templates/BasemapGallery.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div> | ||
<div data-dojo-type="dijit/TitlePane" data-dojo-attach-point="basemapGalleryTitlePane" data-dojo-props="title:'${i18n.title}', open:false"> | ||
<div data-dojo-type="dijit/layout/ContentPane" class="basemapGalleryContent"> | ||
<div id="basemapGallery"></div> | ||
</div> | ||
</div> | ||
</div> |