Hello,
So I've been doing a lot of research, and I cannot find a single thing on this. Here's my dilemma...I have a utility that allows a user to upload an image to SQL server, to be used as a UriImageProvider...works great. I now need to be able to support shapefiles, in the same manner. What I've accomplished thus far is converting shapefile (.shp) into a byte array, and storing in the database as a VarBinary(max). Data is there, seems ok. The way I am getting the images (image/shapefile) from the database and into the RadMap, is by using a HttpHandler. This works great with getting the images, i just set the Uri to the HttpHandler with the ImageId. This is not working with the shapefile through. Here is my code snipped below...
The error I am getting is "Specified argument was out of the range of valid values."
Any help or tips would be greatly appreciated.
So I've been doing a lot of research, and I cannot find a single thing on this. Here's my dilemma...I have a utility that allows a user to upload an image to SQL server, to be used as a UriImageProvider...works great. I now need to be able to support shapefiles, in the same manner. What I've accomplished thus far is converting shapefile (.shp) into a byte array, and storing in the database as a VarBinary(max). Data is there, seems ok. The way I am getting the images (image/shapefile) from the database and into the RadMap, is by using a HttpHandler. This works great with getting the images, i just set the Uri to the HttpHandler with the ImageId. This is not working with the shapefile through. Here is my code snipped below...
Dim shapeResourceInfo As StreamResourceInfo = Application.GetResourceStream(New Uri(map.ImageUri, UriKind.RelativeOrAbsolute))
Dim dbfResourceInfo As StreamResourceInfo = Application.GetResourceStream(New Uri(map.DbfUri, UriKind.RelativeOrAbsolute))
Dim shapes As List(Of FrameworkElement) = ShapeFileReader.Read(shapeResourceInfo.Stream, dbfResourceInfo.Stream)
For Each shape In shapes
Dim infoLayer = New InformationLayer
infoLayer.Items.Add(shape)
TestShapeFileMap.Items.Add(infoLayer)
Next
The error I am getting is "Specified argument was out of the range of valid values."
Any help or tips would be greatly appreciated.