Hello ThinkGeo-Team,
we want to switch map control in our application from Desktop to WPFDesktop edition. At the moment we try to migrate our code to work with WPF edition.
Currently we need help on following problems:
1.)
We have a server side caching system based on following code:
Public Function GetLayerImage(ByVal dblBBULX As Double, ByVal dblBBULY As Double, _
ByVal dblBBLRX As Double, ByVal dblBBLRY As Double, _
ByVal lngImageWidth As Integer, ByVal lngMapUnit As ThinkGeo.MapSuite.Core.GeographyUnit, ByVal lngImageHeight As Integer) As Byte()
Dim oBoundingBox As ThinkGeo.MapSuite.Core.RectangleShape
Dim bytArray(-1) As Byte
Dim oLayer As ThinkGeo.MapSuite.Core.ShapeFileFeatureLayer
Dim oCanvas As ThinkGeo.MapSuite.Core.GeoCanvas
Dim oGeoImage As ThinkGeo.MapSuite.Core.GeoImage = New ThinkGeo.MapSuite.Core.GeoImage(lngImageWidth, lngImageHeight)
Dim oOverlay As ThinkGeo.MapSuite.DesktopEdition.LayerOverlay
oBoundingBox = New ThinkGeo.MapSuite.Core.RectangleShape(New ThinkGeo.MapSuite.Core.PointShape(dblBBULX, dblBBULY), _
New ThinkGeo.MapSuite.Core.PointShape(dblBBLRX, dblBBLRY))
oOverlay = New ThinkGeo.MapSuite.DesktopEdition.LayerOverlay()
SyncLock oOverlay
oLayer = New ThinkGeo.MapSuite.Core.ShapeFileFeatureLayer()
oOverlay.Layers.Add(oLayer)
oOverlay.TileCache = New ThinkGeo.MapSuite.Core.FileBitmapTileCache()
oCanvas = New ThinkGeo.MapSuite.Core.GdiPlusGeoCanvas
Try
oCanvas.BeginDrawing(oGeoImage, oBoundingBox, lngMapUnit)
oOverlay.Draw(oCanvas)
Finally
If oCanvas.IsDrawing Then
oCanvas.Flush()
oCanvas.EndDrawing()
End If
End Try
End SyncLock
bytArray = ThinkGeo.MapSuite.Core.GdiPlusGeoCanvas.ConvertGeoImageToMemoryStream(oGeoImage, System.Drawing.Imaging.ImageFormat.Png).ToArray
Return bytArray
End Function
As you can see we use Overlay and the associated cache to draw on canvas. With the WPF edition we can't do this because there is now draw() method with we can draw direct to the canvas. How can we implement a server cache with WPF edition?
2.)
We have to edit large shapes. In the Desktop Edition you made some enhancements to improve the performance when working with large shapes.
wiki.thinkgeo.com/wiki/File:...Vertex.jpg
In the WPF edition editing of those large shapes is not usable. Can we do something to improve the performance?
Thomas