ThinkGeo.com    |     Documentation    |     Premium Support

Minimap

Hello,


I see that there is not much manipulation you can do in regards to the minimap, at least from what I can see on the surface. This is fine really, but I am having a problem with the way it draws by default. The minimap scale is very small by comparison to the full extents of my map object. I looked through the API Guide but couldn't immediately see how to remedy this.


Any help is appreciated. Thanks.



Nelson, 



We will have a API to set the scale of minimap in the next version. For the current one (3.0.131), you can implement it with the following codes. 



Disable the default MiniMap in the server side: 




Map1.MapTools.MiniMap.Enabled = false; // It is false by default; just make sure you do not set it true. 



Copy the following code to the HTML page: 




<script type="text/javascript"> 
var OnMapCreated = function(map) {
var miniMap = new OpenLayers.Control.OverviewMap({ maxRatio: 4 }); 
map.addControl(miniMap); 
miniMap.maximizeControl(); 

</script>



The ratio here (in maxRatio: 4 ) stands for miniMap.resolution / map.resolution. Please get the attached sample, change its maxRatio and see the effect. 



Any queries please let us know. 



Ben. 

 



189-Post4974.zip (96.6 KB)

Apologies if I am posting in the wrong topic. I did a query for "minimap" resulting in this topic. I am a beginner, and am evaluating Web Edition 3.0; playing with the web samples.


I have successfully added a Google backdrop and several CustomOverlay shapefiles in the main Map, and have enabled the minimap Maptool. However, the minimap does not load the Google backdrop - it is blank with the red box. The red box and zoom functions do respond to mouse clicks and drags, etc.


How do I get data into the minimap?


Thank you,

TzA



TzA,  
  
 Acutally, it’s a known bug that MiniMap works incorrectly with 3rd part overlay such as Google, Yahoo and VirtualEarth map. It’s on our schedule to fix this issue. Sorry for the inconvenience. 
  
 Thanks for evaluating. Any more queries please let me know. 
  
 Thanks, 
 Howard

Hi there,


I am working on creating a web-mapping application using ThinkGeo MapSuite. I want to use minimap for my applicaiton, but the box for the minimap remains empty. Please see the attached screenshot of my web-mapping application. I have tried using server side as well as client side code to enable minimap but it is blank in any case. I would appreciate your help in resolving this issue.



 


Thanks,


Nand




 Nand, 
  
 From the screenshot, I’m not sure if you are using WMSOlveray or LayerOverlay. If it is, I’m sure there is no problem. Could you give us a small demo about the issue?  
  
 There are some issues if the minimap uses Google or Virtual Earth as baseOverlay. If it is, could you give us details about your application to make sure I can give you a workaround? 
  
 Thanks, 
  
 Johnny. 


Hi Johnny,


 


Thanks for your reply. I am using LayerOverlay only and map is created using our own data. I am not using Google or Vitual earth, but still minimap is not working for my application. Please find a poriton of the code below:




LayerOverlay shapeOverlay = new LayerOverlay("Shape Overlay", false,  TileType.MultipleTile);

shapeOverlay.Layers.Add(neatLineLayer);

Map1.CustomOverlays.Add(shapeOverlay);


 


Thanks and Regards,


Nand


 


 



Nand, 
  
 The MiniMap doesn’t support overlays which are non-baseOverlay, so you need to set the second prameter “IsBaseOverlay” to true like below: 
  
 LayerOverlay shapeOverlay = new LayerOverlay(“Shape Overlay”, true,  TileType.MultipleTile); 
  
 thanks, 
  
 Johnny

Hi Johnny,


Minimap works now.


Thank you so much!


 


Regards,


Nand



Nand, 
  
 You are so welcome!  
  
 Thanks, 
  
 Johnny