Is it possible to Save/Export the current View consisting of.
1 Google Base layer
2 Dynamic Overlays ?
I need this for a static report that they will print.
Is it possible to Save/Export the current View consisting of.
1 Google Base layer
2 Dynamic Overlays ?
I need this for a static report that they will print.
Hi Gregory,
GoogleOverlay is a 3rd party overlay so we can't handle much on its images. The following link provided a workaround which used GoogleMapsLayer instead, please check it and let us know if you have further questions.
gis.thinkgeo.com/Support/Dis...fault.aspx
Regards,
Ivan
Is this possible with a BING overlay ?
Gregory,
Yes, we have the BingMapsLayer instead the Bing overlay.
Any more questions please feel free to let me know.
Thanks,
Gary
Hi Gary,
Are there any examples for this?
Thanks for the reply.
Gregory,
Yes, you can find it in our How Do I Samples–>DataProviders–>Use MicrosoftMapsLayer.
Let me know if you have more comments.
Thanks,
Gary
Gary,
I tried to find bing example and failed… i converted the google example to bing.
but now i get an error: myBingMap.Draw(canvas, New Collection(Of SimpleCandidate)())
“Object not set to reference of object”
Dim MapKeyId As String = “map1”
Dim SelectedMap As ThinkGeo.MapSuite.WebEdition.Map = DirectCast(Me.FindControlRecursively(MapKeyId), ThinkGeo.MapSuite.WebEdition.Map)
Dim currentExtent As RectangleShape = SelectedMap.CurrentExtent
Dim myBingMap As New BingMapsLayer(ConfigurationManager.AppSettings(“BingMapsApiKey”))
'Dim googleLayer As New GoogleMapsLayer(“ABQIAAAAoxK_HcqphMsnUQHEwLwHlRSavkNJi0NVTgm4UDidoiIU5dUJpRQW88FufPCp0aTPraxZgZFAIUHn3Q”)
'Dim shapeLayer As TabFeatureLayer = DirectCast(DirectCast(SelectedMap.CustomOverlays(“StaticOverlay”), LayerOverlay).Layers(“StaticOverlay”), TabFeatureLayer)
'shapeLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.FromArgb(100, 212, 220, 184), GeoColor.FromArgb(255, 132, 132, 154), 1)
'shapeLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20
Dim doc As New PdfDocument()
Dim page As PdfPage = doc.AddPage()
page.Size = PageSize.A4
Dim canvas As New BingMapPdfGeoCanvas()
Dim resolution As Double = Math.Max(SelectedMap.CurrentExtent.Width / SelectedMap.Width.Value, SelectedMap.CurrentExtent.Height / SelectedMap.Height.Value)
Dim newDrawingExtent As New RectangleShape(SelectedMap.CurrentExtent.UpperLeftPoint.X, SelectedMap.CurrentExtent.UpperLeftPoint.Y, SelectedMap.CurrentExtent.UpperLeftPoint.X + SelectedMap.Width.Value * resolution, SelectedMap.CurrentExtent.UpperLeftPoint.Y - SelectedMap.Height.Value * resolution)
canvas.DrawingArea = New System.Drawing.Rectangle(0, 0, 800, 600)
canvas.BeginDrawing(page, SelectedMap.CurrentExtent, GeographyUnit.Meter)
’ System.Diagnostics.Debug.WriteLine(“Bing begin drawing”)
myBingMap.Open()
myBingMap.Draw(canvas, New Collection(Of SimpleCandidate)())
myBingMap.Close()
’ System.Diagnostics.Debug.WriteLine(“Bing end drawing”)
’ System.Diagnostics.Debug.WriteLine(“ShapeLayer begin drawing”)
'shapeLayer.Open()
'shapeLayer.Draw(canvas, New Collection(Of SimpleCandidate)())
'shapeLayer.Close()
’ System.Diagnostics.Debug.WriteLine("ShapeLayer end drawing " & vbCr & vbCr)
canvas.EndDrawing()
Gregory,
Thanks for your code, I think your converted code should be right.
And I think a simple sample will be helpful for us to help you solve the exception. You can sent that to our support@thinkgeo.com and ask pass it to me.
Regards,
Don
How would you draw the CustomOverlays ?
Hi Gregory,
Are you meant Map1.CustomOverlays?
We loop that overlay and draw all layers under each overlay.
Regards,
Don
Gregory,
I think you canfind the sample How Do I Samples–>DataProviders–>Use MicrosoftMapsLayer here:
C:\Program Files (x86)\ThinkGeo\Map Suite Web Full Edition 5.0\Samples\VB Samples\Samples\Extending MapSuite\UseMicrosoftMapsLayer.aspx
We commentted the code because render the BingMapsLayer need real ApplicationID, you can uncommentted the code and try your ApplicationID there.
Regards,
Don