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

Custom tile source

8 Answers 202 Views
Map
This is a migrated thread and some comments may be shown as answers.
Clint Singer
Top achievements
Rank 1
Clint Singer asked on 06 Nov 2009, 07:01 PM
Hi,

I was looking through the map control and noticed that it appears to be very similar to the Deep Earth control.  Does this mean that your spatial reference classes are compatible?

I am also assuming that you are using the MultiScaleImage control which means that one should be able to create their own custom tile source fairly easily?

Cheers,
Clint

8 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 09 Nov 2009, 04:43 PM
Hi Clint,

The spatial reference classes are basically some calculations made over a given earth projection. As all developers use the same formulas from the geography reference books, all spatial references for the same projections are somewhat compatible.

In theory you can create your own map provider, but unfortunately we currently do not support custom tile sources.


Kind regards,
Andrey Murzov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Clint Singer
Top achievements
Rank 1
answered on 10 Nov 2009, 10:27 PM
Hi,

What is the timeline with supporting custom map providers?  I created one that emulated the VeMapProvider that you supply and while its IsInitialized is being called the GetTile method is not being called.   Any reasons for this?

Cheers,
Clint
0
Andrey
Telerik team
answered on 11 Nov 2009, 09:59 AM
Hello Clint,

I am sorry, as I mentioned, currently we do not support custom map providers. We are planning to have it in the 2010.Q1 release.

Best regards,
Andrey Murzov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Clint Singer
Top achievements
Rank 1
answered on 11 Nov 2009, 04:26 PM
Hi,

When I asked what the timeline will be, I was more refering to knowing if it will be showing up in internal builds or a beta before the 2010 Q1 release?

The reason that I ask is because we are at a crossroads with respect to what map control we will be using. I would prefer to use all Telerik controls if possible but not being able to hit custom map providers, including one that we host on our own servers, is a show stopper. 

Sorry for the confusion.

Cheers,
Clint
0
Giuseppe
Telerik team
answered on 16 Nov 2009, 11:49 AM
Hello Clint,

We hope that we will be able to add extensibility support for custom map providers for the public Beta release of the Silverlight controls in January (at the moment we do not have a more specific timeframe for the Beta release date).

Hope this helps.


Kind regards,
Manuel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Clint Singer
Top achievements
Rank 1
answered on 23 Nov 2009, 08:52 PM
If anyone wants to use a hack as a work around until official support is in the control:

1) Get a Virtual Earth token.
2) Create a custom map provider using VEMapProvider as the base class.
3) Override GetTile and return a new URI to whatever tile you want to display.
4) Feed a correct token to the base class as if you had used virtual earth for the tile source.
5) Enjoy.

If you don't feed the VEMapProvider a correct token, it will crash with some exception that I can't remember.

I tried using just MapProviderBase but it doesn't even attempt to query for tiles.

Here is an example that uses OpenStreetMap as the provider:

public class OpenStreetMapProvider : VEMapProvider  
    {  
        private const string TilePathBase = @"http://tile.openstreetmap.org/{2}/{0}/{1}.png";  
 
        public OpenStreetMapProvider(string token)  
            : base(MapMode.Road, true, token)  
        {  
        }  
 
        public override Uri GetTile(int tileLevel, int x, int y)  
        {  
            int zoom = this.TileToZoom(tileLevel);  
 
            Uri uri = new Uri(String.Format(TilePathBase, x, y, zoom));  
            return uri;  
        }  
    } 

Hopefully we will see a version that can work MapProviderBase in one of the near future internal builds (hint, hint).

Cheers,
Clint
0
Giuseppe
Telerik team
answered on 25 Nov 2009, 10:19 AM
Hello Clint,

Thanks for sharing this with the community.

As for built-in support support for OpenStreetMaps -- it seems we will be able to provide provider extensibility and OpenStreetMap support a bit earlier than expected i.e. with the official Q3 2009 service pack release in the first half of December.

We have updated your Telerik points for your continuous feedback and involvement with the RadMap control -- keep the flow coming!


Kind regards,
Manuel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Clint Singer
Top achievements
Rank 1
answered on 28 Nov 2009, 12:13 AM
Hi,

I just downloaded and updated my code for latest 11.27 internal release and I would like to thank you for updating the RadMap to properly support custom map providers.  Now I don't have to use a hack using the Virtual Earth tokens to prevent the library from crashing.

Now if the TileLayer class would work properly (zooming, panning, etc) I would be very happy!

Cheers,
Clint
Tags
Map
Asked by
Clint Singer
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Clint Singer
Top achievements
Rank 1
Giuseppe
Telerik team
Share this question
or