[Shapedotnet-development] Rerendering a used imaplayer
Status: Beta
Brought to you by:
k5jvc
From: Rife, R. <ri...@pw...> - 2004-02-03 15:04:38
|
So I built an application that loads a shapefile to a map and then cache's the imaplayer that was added to the map to a collection. If I attempt to add the imaplayer to a new map object it will render the map properly, however if I attempt to zoomin, the zoomin function does the math properly but the screen doesn't actually draw the shapefile zoomed in. Any ideas on how to fix this?? =20 Here's some pseudo code of what I'm doing: =20 System.Collections.ArrayList layers =3D new System.Collections.ArrayList(); =20 System.Drawing.Bitmap mapImg =3D new System.Drawing.Bitmap(500,500); ShapeDotNet.GIS.Map myMap =3D new ShapeDotNet.GIS.Map(); layers.add(myMap[myMap.Add(@"c:\mylayer.shp")]); myMap.Draw(mapImg); =20 ShapeDotNet.GIS.Map newMap =3D new ShapeDotNet.GIS.Map(); newMap.Insert(0,layers[0]); newMap.MapMetrics.UpdateMetrics(); //I exposed the mapmetrics so I can monkey with the numbers newMap.Draw(mapImg); //this works ok =20 newMap.ZoomIn(50,50); //this works internally (viewport is correct) newMap.Draw(mapImg); //this doesn't work, it is not drawing the viewport, appears to only be the extent =20 //finish =20 =20 |