Map Modes with Custom Provider

2 posts, 0 answers
  1. Esther
    Esther avatar
    13 posts
    Member since:
    Jun 2010

    Posted 21 Jun 2012 Link to this post

    Hello,

    I have created a custom provider with my own tiles. 
    Now,I´d like to create three map modes with different tiles. (Roal, Aerial.. as Bing or Google)
    I want to show my modes on the toolbar so the user could change view easily.
    How can I do that? I have no idea where I have to indicate the different modes. I have my TilesProvides created like that
    Public Sub New(ByVal tileLocation As String, ByVal tileUri As String)
            MyBase.New()
     
            Dim source As New NavteqMapSource(tileLocation, tileUri)
     
            Me.MapSources.Add(source.UniqueId, source)
     
     
        End Sub

    But I need three different Uris for each MapMode. Do I have to create three different providers? 
    If so, How can I add this providers to the toolBar?
    Thank you very much,

    Esther



  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 26 Jun 2012 Link to this post

    Hi Esther,

    You have to create 3 map sources: 1 for every mode. It can be done the same way as we did for the OpenStreet map provider. Your company has source codes of the RadControls, so I would recommend you to take a look to the following classes:

    1. OpenStreetMapProvider (Controls\DataVisualization\Map\Providers\Map\OpenStreet\OpenStreetMapProvider.cs)
    2. OsmTileMapSource(Controls\DataVisualization\Map\Providers\Map\OpenStreet\OsmTileMapSource.cs)
    3. OpenStreetMapnikSource(Controls\DataVisualization\Map\Providers\Map\OpenStreet\OpenStreetMapnikSource.cs)
    4. OpenStreetOsmarenderSource(Controls\DataVisualization\Map\Providers\Map\OpenStreet\OpenStreetOsmarenderSource.cs)

    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
Back to Top