I am working on The XamWebMap control to render a set of big shapefiles. I would like to optimize my application so i could download the shapefiles in ziped format and put it in the Isolated storage, and to re use the same file over the life of the application. However the Shapefile reader only takes URI. Is there a way i could make it read from the Isolated storage? Are there any other optimization techniques i could use to avoid downloading of the big shapefiles?
Many Thanks
A point I have not elaborated, I am also interested in creating an out of browser application once i have the In browser Experience in place. So that is also another reason why I need the loading from the Isolated Storage.
I don't think its possible, currently, to read a file out of isolated storage using a URI, and I'm not sure if there is any way to register your own URI handlers with Silverlight. You're best bet would probably be to make a feature request to be able to provide a stream to ShapeFileReader. http://devcenter.infragistics.com/protected/requestfeature.aspx
If you are feeling courageous you could try using the SQLShapeReader which takes an IEnumerable. You can see the SqlShapeReader help for more info, but this would require that you converted your shape files into that format, and that you could serialize the data into files in isolated storage, so the feature request may be a better fit, depending on your situation.
There may be some way of redirecting a URI get to the isolated storage, but I haven't come accross one yet. Make sure to let us know if you do!
-Graham
Unless I'm mistaken, the purpose of Isolated Storage Files is that you can't read them from another application. Its supposed to keep low trust apps from reading each others data. If you give high enough trust to an app, you may just be able to read the data off the file system though. But I'm pretty sure you aren't supposed to use the isolated storage system this way.
If you need global access to files from a silverlight application on a machine, you might either need to talk to a local web service that can give you the files, or make the app full trust and get them off the file system in some manner (COM?)
If the data mapping isnt working, then it probably can't find the dbf file. Could you share a sample and I can help point out the issue?
The dbf file that it searches for uses a hard coded string in the above sample. Fix that so that it trims the shp and adds a dbf to whatever file name is presented, and it should resolve the issue.
Hi... This post solved my problem..
But I have one more problem.. i.e How can i read existing Isolated Storage Files in other silverlight application.
My requirement is. Like i have One Application which is used to Create a Isolated Storage and Copy files into it and having one more Application which is used to Read the copied files..
Here I am Getting problem to Read Existing Files from Isolated Storage. Its Creating another Isolated Storage and reading files from this new isolated storage..
Please Solve it asap...
Thank u..
Hi All,
I am able to use the Isolated storage through the above code. But data mapping for the reader is not giving color code if i map to any one of my fields in the shape file. Can any one help me out in this issue.
Thanks in Advance,
Pavan