This is a migrated thread and some comments may be shown as answers.

Displaying Drawings with Empty Map Provider

3 Answers 102 Views
Map
This is a migrated thread and some comments may be shown as answers.
Adnan
Top achievements
Rank 1
Adnan asked on 10 May 2012, 09:28 AM
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

3 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 15 May 2012, 09:04 AM
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 >>

0
Adnan
Top achievements
Rank 1
answered on 17 May 2012, 03:46 PM
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
0
Andrey
Telerik team
answered on 22 May 2012, 11:27 AM
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 >>

Tags
Map
Asked by
Adnan
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Adnan
Top achievements
Rank 1
Share this question
or