Hello,
I am able to set thinkgeo minimap to work, yet, i have the need to costumize the control to create a separate logic from the main map. I'm having some trouble doing this:
this.OverviewMap = this.Map.get_MapEngine().getControl('OverviewMap');
if (this.OverviewMap != null) {
if (this.Map != null)
var mapParser = this.Map._MapParser;
var layers = new Array();
for (var i = 0, layerIndex = 0; i < this.Layers.length; i++) {
layers.push(mapParser.getLayerByJson(this.Layers));
}
this.OverviewMap.layers = layers;
this.OverviewMap.update();
}
The final result is a gray miniMap with no layers. What i'm i doing wrong? I've tried diferent aproaches. I've tried building the overviewMap myself and adding it to map controls collection like this:
var controlOptions = {
maximized: true,
layers: layers
};
this.OverviewMap = new OpenLayers.Control.OverviewMap(controlOptions);
this.Map.get_MapEngine().addControl(this.OverviewMap);
In this case, how do i get map options without having to write it one by one?