EmptyProvider problems

4 posts, 1 answers
  1. Jason D
    Jason D avatar
    72 posts
    Member since:
    Jan 2011

    Posted 15 Jan 2015 Link to this post

    Our clients typically import data into our application using known coordinate systems, such as UTM. However, now we need to add support for unknown, arbitrary coordinate systems (we won't show an underlying basemap). I am struggling with this. My understanding is I should use an EmptyProvider and the EPSG900913Projection. I have several issues, but the first is the Center. In your Mercator (meters) example, the Center is set using meters:

    Center="296247.258782387,426130.145788193"

    However, when I create a blank project and set the Center using meters, the value contained in the center is still in decimal degrees:

    moMap.Center = New Location(5643603, 2559429)

    Printing moMap.Center shows the following:
    {85.05112878,180}
        CalculationMethod: ""
        Description: ""
        Empty: {-Infinity,-Infinity}
        IsEmpty: False
        Latitude: 85.05112878
        Longitude: 180.0

    What am I doing wrong? Once working, will all the other map methods and properties return values in meters instead of degrees, too?
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 20 Jan 2015 Link to this post

    Hi Jason,

    We are unable to reproduce the mentioned issue. When we set up blank project with just RadMap in it, setting the Center to the mentioned value ("296247.258782387,426130.145788193") works as expected. Please check out our test project and let us know the part we are missing from your scenario.

    Regards,
    Petar Mladenov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Jason D
    Jason D avatar
    72 posts
    Member since:
    Jan 2011

    Posted 20 Jan 2015 Link to this post

    Ok, I got it working. It was a stupid mistake on my part.

    Is this correct: If I supply my own provider with its projection set to EPSG900913Projection, I don't need to supply an EmptyProvider?

    And: If I don't supply a custom provider, but want to use the VisualizationLayer, I must add an EmptyProvider?
  5. Answer
    Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 23 Jan 2015 Link to this post

    Hi Jason,

    Yes if you add your own custom provider , you won't need Empty Provider. If you don't add your own provider, empty provider is almost mandatory  It provides definitions and methods which can be used to calculate positions of the framework elements, map shapes and pin points.

    Regards,
    Petar Mladenov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top