Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
105
Map does not show shapefile
posted

Hello guys. We are evaluating your product. Map is a very nice, but it is completely unfriendly to swallow all errors in ShapeReader. You should throw up errors when shape file not found or unreadable.

We created 2 maps in MapWindow. One of them successfully shows but for second (see attach) webmap silently draw empty screen.

there is no visible differences between each of them.

Help!

samara_map.rar
Parents
No Data
Reply
  • 30692
    Verified Answer
    Offline posted

    The shape file you attached is being read perfectly fine, the problem is one of projection. The default projection that the map control uses is spherical mercator, but I think the attached map already has a map projection applied, and the values being fed into the control's spherical mercator projection are outside of the bounds it will tolerate and get clamped. So if I change the projection type like this:

    <igMap:XamWebMap MapProjectionType="Equirectangular">

                <igMap:XamWebMap.Layers>

                    <igMap:MapLayer>

                        <igMap:MapLayer.Reader>

                            <igMap:ShapeFileReader Uri="ShapeFiles/Samara_region_adm_map"/>

                        </igMap:MapLayer.Reader>

                    </igMap:MapLayer>

                </igMap:XamWebMap.Layers>

            </igMap:XamWebMap>

    The shapes appear correctly. I would investigate why one of the maps that you have has a projection pre-applied and the other does not. You can have the reader UnProject from a coordinate system and then the map control reproject into another if you can identify which coordinate system the shape file is using (check out the CoordinateSystem property on the reader). This help?

    -Graham

Children