ThinkGeo.com    |     Documentation    |     Premium Support

Map not showing on latest release

Hi,


 


i just tried the latest version released on 12/3/08, whenever i added a CustomLayer, the whole map disappeared, like: Map1.CustomOverlays.Add(markerOverlay);


if i remove this layer, all my Map1.StaticOverlay layers shows up. i then uninstall the latest version and went back to the prior version, the maps worked again. Just informing you of this situation.


 


 


 



Ric,


This is a breaking change in the latest version (3.0.131). In 3.0.117, you can use StaticOverlay, DynamicOverlay with the CustomOverlays collection together, but now you can not. The StaticOverlay, DynamicOverlay, BackgroundOverlay and MarkerOverlay are “shortcut” overlays which will be automatically disabled when you use CustomOverlays.
 
Also here is a post with the same topic, please have a look:
gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/12/aft/4876/afv/topic/Default.aspx
 
please let me know for any queries.
 
Ben.

Ben, 
  
 i have read the link. So the static/dynamic overlays and the CustomOverlay are 2 different modes. But since i will be needing soem functions that only statis/dynamic have, i have to use that for now. i have a layer that’s full of markers that are moving always, , from what i understand, i should use MarkerOverlay. How do i add this layer in static/dynamic mode?

Ric, 
  
         You can use either mode as you want. Static/Dynamic Overlay’s type is “LayerOverlay” and CustomOverlays collection accepts “OverLay”, which is the base class of “LayerOverlay”, I think that’s why you found some functions only available in Static/Dynamic overlays. Just create a new LayerOverlay, in which you can also find those functions, and add it to the CustomOverlays collection. 
  
         Maybe you don’t need it now, but still here is how to set the MarkerOverlay in the Static/Dynamic mode. The Map1.MarkerOverlay is an InMemoryMarkerOverlay, you can add markers one by one to its features, but if you want to import whole bunch of features from a FeatureSource, please create a new FeatureMarkerOverlay, ----another kind of MarkerOverlay, and add it to CustomOverlays. 
  
 Here is the code how to use the default InMemoryMarkerOverlay, --------Map1.MarkerOverlay 
 
Map1.MarkerOverlay.Features.Add("Kansas", new Feature(-94.558, 39.078))
Map1.MarkerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.Popup.ContentHtml = "Kansas City</Div>"
Map1.MarkerOverlay.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20
 
  
 Hope that makes sense.  
  
 Ben