Blogs

DK for ASPNET - An easy way to publish Web Tiles

With the IS v.10 you can easily convert an existing map project to WebTiles. The Server will dynamically create and cache Web Tiles on demand.

You can test this right now using OpenLayer.

The code behind this is quite simple (see below). By default images are cached for 24 hours.

NaturalEarthData_Cultural.aspx

  <%@ Page Language="C#" Debug="True" %>
  <%@ Import Namespace="TatukGIS.Web.Extensions.TileServer" %>

  <!DOCTYPE html>
  <script runat="server">
    static TileServer oTileServer = new TileServer(
                                          "Natural Earth Data Cultural Tiles",
                                          "Tiles/NED-Cultural",
                                          @"c:\Data\NED\Cultural.TTKGP"
                                       ) ;
    protected void Page_Load(object sender, EventArgs e)
    {
        oTileServer.DoPageLoad() ;
    }
  </script>


  <html xmlns="http://www.w3.org/1999/xhtml">
  <head runat="server">
    <title><%=oTileServer.AppName%></title>
  </head>
  <body>
    Use Tile server: 
    <%=HttpContext.Current.Request.Url.AbsoluteUri%>?tile=/s/col/row/[.png|.jpg]
  </body>
  </html>


Of course you can also access Web Tiles using TatukGIS Editor. Simply create and open a .TTWP connector file like this one:

NaturalEarthData_Cultural.ttkwp

  [TatukGIS Layer]
  Storage=WEBTILES
  Type=TMS
  TilesOrder=DOWNRIGHT
  Name=ned_tiles_cultural
  Caption=Natural Earth Data (Culture) Tiles 
  Url1=http://samples.tatukgis.com/TileServer/NED/NaturalEarthData_Cultural.aspx?mode=tms&tile=
  EndLevel=11
  Format=png
  Copyright=Natural Earth Data.
Posted: December 09, 2013 | with 0 comments
Filed under: ASP.NET, DK, IS, WebTiles
Comments
Blog post currently doesn't have any comments.
To add comment please sign in first
User name:  
Forgotten password
follow us on Facebook  follow us on Twitter  follow us on Google +  follow us on LinkedIn  Embarcadero