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

Custom provider for my own custom map server

6 Answers 75 Views
Map
This is a migrated thread and some comments may be shown as answers.
Arash
Top achievements
Rank 1
Arash asked on 22 Feb 2012, 03:35 PM
Hi all,

I have map tiles in my own database. How can I use them in my custom map provider?
The GetTile method in instructions returns the URI of the image but I have the actual image in my database. How can I make RadMap to work with it?

6 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 24 Feb 2012, 02:33 PM
Hi Arash,

You cannot access tiles stored in the database directly from the custom map provider. But you can create your own tile server which will get tile requests, read tiles from the database and return them.


Regards,
Andrey Murzov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Arash
Top achievements
Rank 1
answered on 25 Feb 2012, 07:24 AM
I'm sorry I'm new to Silverlight and please excuse me if I'm doing any mistakes. I have two projects in my SL project. One of them is my web server. So, Is it possible to implement my custom map server in my web server? I mean store a database there and an API for returning tiles there? But what will be the URL? Or you mean that I should provide my own web service in another server? Could you please give an example of doing this?
0
Arash
Top achievements
Rank 1
answered on 26 Feb 2012, 08:48 AM
In this blog it is defined how to provide offline server with tiles stored in IIS directory. http://blogs.telerik.com/blogs/posts/11-09-27/radmap-for-silverlight-how-to-consume-tiles-from-local-server.aspx 

But, my tiles have been stored in a SQL Server database. How can I achieve this goal with my database? 
0
Arash
Top achievements
Rank 1
answered on 28 Feb 2012, 07:37 AM
No one is gonna answer me?
0
Accepted
Andrey
Telerik team
answered on 29 Feb 2012, 10:46 AM
Hi Arash,

Unfortunately we don't have an example of the tile server which read tiles from the database and creation of those tile server is outside of the scope of the RadMap control. I'm sorry. As a quick suggestion I could recommend the following:

Create new ASP.NET page in your web project. This page should process request parameters and get zoom level and X,Y coordinates of the tile. Then it should read image from the database and return it in the response. You can find many examples of the similar code in Internet.

You definitely can implement custom tile server in the web project. The absolute URI will depend on the location of the web application. But you can use the value of the HtmlPage.Document.DocumentUri property in your Silverlight application to create it from the URI of the Silverlight application.

Regards,
Andrey Murzov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Arash
Top achievements
Rank 1
answered on 29 Feb 2012, 11:14 AM
Thank you very much
Tags
Map
Asked by
Arash
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Arash
Top achievements
Rank 1
Share this question
or