Displaying Drawings with Empty Map Provider

4 posts, 0 answers
  1. Adnan
    Adnan avatar
    5 posts
    Member since:
    Jul 2011

    Posted 10 May 2012 Link to this post

    Hi,

    I have a large number of DXF CAD Files which I have converted to either SHP files or stored the Geometry in SQL Server.  The requirement is to display these on the Map control.  The files which have a Spatial Reference System specified are displaying properly.

    However a number of files do not have a SRS specified, these require displaying on the map, but obviously without any Map Providers. I will assume that the coordinates are in arbitrary X, Y. the demo examples use SHP files, can this be achieved by retrieving data directly from SQL Server?

    Many thanks,

    Adnan
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 15 May 2012 Link to this post

    Hello Adnan,

    You can use the SqlGeospatialDataReader to show geospatial data from SQL Server. For more information please take a look at the following documentation topic:
    http://www.telerik.com/help/wpf/radmap-features-sql-geospatial-data.html

    The RadMap must always use a map provider (at least Empty Map Provider). The Empty Map Provider supports to use the following projections:
    - The Mercator projection EPSG:4326 (default) that refers to WGS84 as (latitude, longitude) pair coordinates in degrees
    - The OSGB-1936 projection which also known as EPSG:27700
    - The EPSG:900913 projection which is also known as EPSG:3857 and Pseudo-Mercator projection that refers to WGS84 as (latitude, longitude) pair coordinates in meters.
    Also the Empty Map Provider allows that you use your own custom projections. You should implement the ISpatialReference interface to create a projection.

    For more information about Empty Map Provider please take a look at the following documentation topic:
    http://www.telerik.com/help/wpf/radmap-features-empty-provider.html

    The EPSG:900913 projection is proportional projection. I think you can use it to show geospatial data which contains coordinates like arbitrary X, Y.
    The sample code for using projection for Empty Map Provider is below.

    <telerik:RadMap Name="radMap">
        <telerik:RadMap.Provider>
            <telerik:EmptyProvider>
                <telerik:EmptyProvider.Projection>
                    <telerik:EPSG900913Projection />
                </telerik:EmptyProvider.Projection>
            </telerik:EmptyProvider>
        </telerik:RadMap.Provider>
    </telerik:RadMap>

    All the best,
    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Adnan
    Adnan avatar
    5 posts
    Member since:
    Jul 2011

    Posted 17 May 2012 Link to this post

    Hi Andrey,

    Thank you for the guidance on using the Empty Provider.

    The issue I am no facing is using the Empty Provider with the Dynamic Layer, I am struggling to get this to work.  Is the Dynamic Layer designed to only be used by the Mercator projection?

    Thanks

    Adnan
  5. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 22 May 2012 Link to this post

    Hello Adnan,

    The Dynamic Layer as well as Information Layer uses the projection which is specified in the map provider. For example when you specify EPSG:900913 projection for the Empty Provider then the Layer will use this projection for placing its elements.

    All the best,
    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top