Create Tile Layers
-
Monday, January 23, 2012 2:47 PM
I show more than 5000 polylines on a Bing Map (Silverlight - C#). I want to us Tile layers. How can I create this layers from my current polylines?
Thanks!
- Moved by Richard_BrundrittMicrosoft Employee, Owner Friday, March 16, 2012 6:29 PM (From:Bing Maps: Map Control and Web services Development)
All Replies
-
Monday, January 23, 2012 3:11 PMOwner
You will need to create the tile layers on the server side. Here are two good places to start:
http://rbrundritt.wordpress.com/2009/11/26/dynamic-tile-layers-in-the-bing-maps-silverlight-control/
http://dataconnector.codeplex.com/
http://rbrundritt.wordpress.com- Marked As Answer by Richard_BrundrittMicrosoft Employee, Owner Thursday, February 02, 2012 1:23 AM
-
Monday, January 23, 2012 6:31 PM
Thanks. When I open your first suggestion in VS2010 (And SQL server 2008R2 on same machine) and run, I get folllowing error when I check a radio button;
System.Data.SqlClient.SqlException was unhandled by user code
Message=A .NET Framework error occurred during execution of user-defined routine or aggregate "geometry":
System.FormatException: 24141: A number is expected at position 25 of the input. The input has ,.
System.FormatException:
bij Microsoft.SqlServer.Types.OpenGisWktReader.RecognizeDouble()
bij Microsoft.SqlServer.Types.OpenGisWktReader.ParseLineStringText()
bij Microsoft.SqlServer.Types.OpenGisWktReader.ParsePolygonText()
bij Microsoft.SqlServer.Types.OpenGisWktReader.ParseTaggedText(OpenGisType type)
bij Microsoft.SqlServer.Types.OpenGisWktReader.Read(OpenGisType type, Int32 srid)
bij Microsoft.SqlServer.Types.SqlGeometry.GeometryFromText(OpenGisType type, SqlChars text, Int32 srid)
.
Source=.Net SqlClient Data Provider
ErrorCode=-2146232060
Class=16
LineNumber=18
Number=6522
Procedure=GetCountriesByBoundingBox
Server=PC-2
State=1- Edited by nijs9 Monday, January 23, 2012 8:39 PM
-
Tuesday, January 24, 2012 9:41 AMOwnerEnsure that the database is properly deployed and that the connection string has been updated in the application. Also ensure that there are no missing dll's.
http://rbrundritt.wordpress.com -
Tuesday, January 24, 2012 9:53 AMConnection string is updated, database is succesfully deployed, and there are no missing dll's. (I think otherwise the application do not start up). Is it possible there is a problem with my locat setting? I'm from Belgium...
-
Tuesday, January 24, 2012 12:01 PM
When I run the project at http://dataconnector.codeplex.com/ I get the same error...
Is it possible it don't work in .NET FRAMEWORK 4, or VS 2010?
-
Tuesday, January 24, 2012 1:07 PM
It runs! The problem was my local settings...
This program is fantastic. Is there a way to support linestrings? In this configuration only polygons are supported...
-
Tuesday, January 24, 2012 6:38 PMOwnerLinestrings should be supported. They work in the demo app.
http://rbrundritt.wordpress.com -
Thursday, January 26, 2012 6:41 PM
I don't think so... Only polygons and multipolygons work. For example in TilerenderEngine.cs you can see there is no support for polylines:
case Constants.ShapeType.Polygon: Polygon polygon = shapes[i].SimpleBoundary; points = GeospatialTools.CoordinateArrayToRelativePointFArray(polygon.ExteriorRing, _topLeftPixel, zoomMapWidth); gr.FillPolygon(shapes[i].FillColor, points); break; case Constants.ShapeType.Multipolygon: MultiPolygon multiPolygon = shapes[i].ComplexBoundary; for (int j = 0; j < multiPolygon.Count; j++) { points = GeospatialTools.CoordinateArrayToRelativePointFArray(multiPolygon[j].ExteriorRing, _topLeftPixel, zoomMapWidth); gr.FillPolygon(shapes[i].FillColor, points); } break; //Do not render Points, MultiPoints, Polylines, Multilines or shapes with a null type for this demo case Constants.ShapeType.Point: case Constants.ShapeType.Multipoint: case Constants.ShapeType.Polyline:
-
Thursday, January 26, 2012 9:22 PMOwner
I've updated the code sample to support linestring and multilinestring.
http://rbrundritt.wordpress.com- Marked As Answer by Richard_BrundrittMicrosoft Employee, Owner Thursday, February 02, 2012 1:23 AM
-
Thursday, February 23, 2012 9:24 PM
Here is a simple Bing map dynamic layer module
https://sites.google.com/site/gissoftwareconsulting/product/bingmaplayer
- Edited by gissc Thursday, April 05, 2012 1:48 PM

