Drawing And Editing Sample for WebApi
This sample demonstrates how to implement drawing and editing shapes into your web application.
Please refer to Wiki for the details.
This sample makes use of the following NuGet Packages
About the Code
PlatformGeoCanvas geoCanvas = new PlatformGeoCanvas(); RectangleShape boundingBox = WebApiExtentHelper.GetBoundingBoxForXyz(x, y, z, GeographyUnit.Meter); geoCanvas.BeginDrawing(bitmap, boundingBox, GeographyUnit.Meter); layerOverlay.Draw(geoCanvas); geoCanvas.EndDrawing(); MemoryStream memoryStream = new MemoryStream(); bitmap.Save(memoryStream, ImageFormat.Png); HttpResponseMessage responseMessage = new HttpResponseMessage(HttpStatusCode.OK); responseMessage.Content = new ByteArrayContent(memoryStream.ToArray()); responseMessage.Content.Headers.ContentType = new MediaTypeHeaderValue("image/png");
This example makes use of the following APIs:
About Map Suite
Map Suite is a set of powerful development components and services for the .Net Framework.
ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.