Overview Map Example
Hello folks!!!
Where can I find an example of using the object "this.app.site.overviewMap"? I need to add a "OverView Map" in my map. I will copy my code below.
Some questions:
- What is the best place to add the new "dojo.require (" esri.dijit.OverviewMap ");"? I need to guarantee your load before reading the ViewModel.
- Where can I find a documentation framework updated? https://resources.geocortex.com/essentials/apis/javascript/ (outdated, right?) I'm working on a prototype with GeoCortex. I need the maximum of information possible.
My current code:
ViewModel
dojo.require("esri.dijit.OverviewMap"); // Is here a good place?
dojo.declare("Edit.UI.Web.CarteInteractive.OverViewMapViewModel", geocortex.framework.ui.ViewModelBase, {
constructor: function (app) {
app.eventRegistry.event("SiteInitializedEvent").subscribe(this, this.siteInitialized);
},
siteInitialized: function () {
if (this.app.map && this.app.site.hasOverviewMap) {
var esriMap = this.app.site.getMap();
this.app.eventRegistry.event("onLoad").subscribe(overviewMapBaseLayer, function() { alert("test!"); } );
var overviewMapDijit = new esri.dijit.OverviewMap({
map: esriMap,
baselayer: // HELP HERE! this.app.site.overviewMap.METHOD() ?????,
maximizeButton: true, // FAIL! doesn't render
attachTo: "bottom-right", // ?
opacity: 0.2,
visible: true
});
overviewMapDijit.startup();
}
}
});
CONFIG!
{
"moduleName": "OverViewMap",
"moduleType": "etc.OverViewMap",
"libraryId": "Gga",
"viewModels":
[
{
"id": "OverViewMapViewModel",
"type": "etc.OverViewMapViewModel",
"configuration": { }
}
]
}
Thanks!
0
-
Solved!
0
Please sign in to leave a comment.
Comments
1 comment