Hi,
I am creating a Sketchflow prototype with xamMap. I need to share the prototype as a standalone to the client. i.e I will zip it and share to customer, instead of deploying in IIS.
Since am using usa_st shapefiles in the xamMap, I am unable to add these files to xap. I tried the BuildAction as Resource & Content and it is not working.
Only way is to deploy the app in IIS and put the shapefiles in ClientBin folder. Kindly let me know is there anyway like image, I can add shapefiles and use it as standalone.
Hi Jayaprakash C,
In order to get your shapefile copied in the ClientBin, you could try the following approach:1) Add the shapefile to your project and mark it with Build Action:Content and Copy to Output Directory: Copy always.2) Add a "/" before the name of the folder, containing the file, like this: <igMap:XamMap x:Name="theMap"> <igMap:XamMap.Layers> <igMap:MapLayer LayerName="statesLayer"> <igMap:MapLayer.Reader> <igMap:ShapeFileReader Uri="/Shapefiles/usa/usa_st" DataMapping="Name=STATE_NAME"/> </igMap:MapLayer.Reader> </igMap:MapLayer> </igMap:XamMap.Layers> </igMap:XamMap>
Hope that helps,Milana Zhileva
Hi Milana,
Your solution will copy the files to ClientBin, which I dont want.
I want only two files as my end output a html page & xap file. So I can send these two files in mail and any one can view the app by running the html.
This behaviour is possible by making an image as Resource. But for shapefiles it is not working. How I can do that?
Apologies for the confusion - actually my solution, described above, will include the shapefile in the .xap file, which is located at the ClientBin. As far as I can understand, this is the effect you want to achieve.
Best regards,Milana Zhileva
I see you’ve been in discussion with Milana. If I may add a note to Milana’s comments, I did find this thread with Graham, which looks like it contains information which may be helpful to you. In the thread, “reading Shapefiles from the Isolated storage”, he talks about registering custom prefixes in Silverlight 3 in order to redirect URI requests and he provides a sample.
http://blogs.infragistics.com/forums/p/39754/224780.aspx
Hope this helps.
Please take a look at this sample project -, where the shapefile is marked as a Content and included in the application's .xap file. The only thing that needs to be done in order to get the project running is to add the references to Infragistics assemblies.
Feel free to post back should you have any further questions.
It didnt solve my purpose. It seems I cant use shapefiles inside xap. So as of now I am deploying files to IIS only.