Current filter:
                                You should refresh the page.
                                  • Hi DevExpress Team,

                                          I want to load a map from a shape file. There is a mapcontrol which contains one VectorItemsLayer and the layer contains a ShapeFileDataAdapter. The adapter’s properties are shown in the attached picture.  
                                          When the program runs, it will let user choose a shape file to load. After the first choice I do not see anything on the control. Then I repeat choosing the same file and it works. The following is a part of the function which is used to load shape file.
                                          shpDataAdapter.FileUri=new Uri(filePath, UriKind.RelativeOrAbsolute);
                                          shpDataAdapter.Load();

                                    Thanks for helping out!

                                • Alex (DevExpress Support) 12.04.2018

                                  Hi Yao,

                                  My attempts to reproduce a similar issue with a newly created sample project were not successful. If this issue appears to be specific to a particular shapefile, feel free to modify the attached example and include your shapefile for further examination. We will check for a suitable solution.

                                  P.S. Note that it is not necessary to specify the coordinate system converter if you have a .PRJ file associated with a shapefile. In this case, the coordinate system information will be automatically initialized based on the .PRJ file's data.

                                • Yao Biao 12.05.2018
                                  Hi, Alex:
                                  Thank for your reply. I decompress the file T696772.zip and then open the file licenses.licx with notepad. It shows that the version of mapcontrol you reproduced in is 18.1.7.0 
                                  , which is different from the one that I described(18.1.4). Besides, I will send my shape file to you, so as to ensure whether the file is correct or can be loaded smoothly in the first time.
                                  Regards 
                                • Constant (DevExpress Support) 12.06.2018

                                  I was unable to replicate the problem on my side by converting the project to version 18.1.4. You can find the modified example in the attachment. Would you please check how it works on your side? 
                                  BTW: You can always convert a project to your version as described in the Upgrade Notes help topic.

                                • Yao Biao 12.06.2018
                                  Thank for your help. I tried to replicate the problem by creating a simple application, but failed. After I deleted the mapcontrol and added a new one, I found that the 'load' function was OK by the process of debugging the program. I suddenly got something! I should have waited a few milliseconds to let the mapcontrol load the shape file totally instead of getting the items of the adapter immediately. After all, thanks a lot for helping me solve the problem.
                                • Constant (DevExpress Support) 12.06.2018
                                  We are happy to hear that the problem is now resolved. Thank you for informing us of that. 

                                0 Solutions

                                Creation Date Importance Sort by