ThinkGeo.com    |     Documentation    |     Premium Support

Refresh Issue

I am currently trying to convert a 2.0 application over to the new 3.0 version.  I am using Beta 2 at this point in time however I am running into a couple issues.


First issue, I load some shape files when the winform loads initially with a default zoom level of 14.  I only want the points and their associated icons to show up at that point otherwise things are just way to cluttered.  I have attached the code below but I believe it is fine.  However, it just seems to take a couple minutes for things to show up once I get zoomed into those levels.  For instance, the street names, I can let the map site for 2 minutes or so before the street names start to appear as well as any other detail at those levels.  This is on a new QuadCore 2.33 machine with 6GB RAM.


Second issue, one of the shapefiles that I am loading, it is a fire hydrant layout done with Arc something or another by the city of Fargo will not display.  I can load it in ArcExplorer and also your MapSuiteExplorer but I cannot gets the points to display on the map.  The code is the same as below which I don't believe there is anything wrong with.


 



if (File.Exists(Application.CommonAppDataPath + "\\" + shapeFileName + ".shp")) {
ShapeFileFeatureLayer layer = new ShapeFileFeatureLayer(Application.CommonAppDataPath + "\\" + shapeFileName + ".shp", ShapeFileReadWriteMode.ReadOnly);
layer.ZoomLevelSet.ZoomLevel14.DefaultPointStyle.PointType = PointType.Bitmap;
layer.ZoomLevelSet.ZoomLevel14.DefaultPointStyle.Image = new GeoImage(Assembly.GetExecutingAssembly().GetManifestResourceStream("EPIC.Works.Resources." + assetType.AssetTypeResource));

// Create and set zoomlevel.
layer.ZoomLevelSet.ZoomLevel14.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
Map.StaticOverlay.Layers.Add(layer);
layer.Close();
}
 

Thanks.


Curtis



This is just a quick note, but I believe they flipped the ZoomLevel between v2 and v3 so Level14 is actually close it, Level6 would be the v2 equivilent I believe. 
  
 I am only a noob but I played with the ZoomLevels for a while to work out which way was which :), not sure if that helps.

Michael,


Thanks for the info.  I have it set so that the points only show at the more detailed levels, so they start at 14 and go to 20.  I am just a newbe as well and am starting to get a feeling for what is possible/not possible with this package.


Thanks.


Curtis



Curtis, 
  
 It’s strange that takes you 2 minutes. Can you try avoiding using reflection and get the image from some place on disc? What the size of the bitmap is, can you send it to us? Also is there too many stuff showing on the map, can you provide a snapshot? Finally, we used to have an issue that it takes long time when loading an image, so can you check your version and make sure it is latest(3.0.184)? You can use the static method GetVersion in winforms map to get it. 
  
 About the second issue, can you set the style in ZoomLevel01 and apply it to ZoomLevel20 for test? Also please check if you set the right CurrentExtent, you may need to set it to layer’s full extent like following so we can make sure it’s all on the canvas.  
 
           layer.Open();
            winformsMap1.CurrentExtent = layer.GetBoundingBox();
            layer.Close();
 
 Or you can send the data to us and we can do it for you. Just post here or send to support@thinkgeo.com and ask to forward to Ben if it’s sensitive. 
  
 Thanks, 
  
 Ben