0

i am looking for c# routine where i will pass a big picture path and routine will break that picture in tile and save in file system and also save each small tile into into db.

1) so redirect me to routine which can break image into small tile 2) my db table would look for store tile data for each userid

ID    UserID    Z    X    Y
---   ------   --- ----  ----
1     Bob       0    0    0
2     Chris     1    1    1

the above data is a fake one. i am looking for a way which break big image data into tile and save tile info into right folder structure and also save image info including folder structure into db table as a result i could load tile from file system but based on store tile data into db table.

here i got a vb.net could which is loading tile data

How you generate and return the tiles is very flexible indeed

L.tileLayer('**http://localhost/tileserver/tile.aspx?z={z}&x={x}&y={y}**', {
    minZoom: 7, maxZoom: 16,
    attribution: 'My Tile Server'
}).addTo(map);

where Tiles.aspx

Option Strict On

Partial Class tile
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
        Dim z, x, y As Integer

        z = CInt(Request.QueryString("z"))
        x = CInt(Request.QueryString("x"))
        y = CInt(Request.QueryString("y"))

        Dim b() As Byte = DB.GetTile(z, x, y)

        Response.Buffer = True
        Response.Charset = ""
        'Response.Cache.SetCacheability(HttpCacheability.NoCache)
        Response.ContentType = "image/png"
        Response.AddHeader("content-disposition", "attachment;filename=" & y & ".png")
        Response.BinaryWrite(b)
        Response.Flush()
        Response.End()
    End Sub

here i have one confusion that how the below code can load many small tile because when we break a big picture into small tiles then we need load all tiles or few tiles on page load but below code is looking for a specific tile

http://localhost/tileserver/tile.aspx?z={z}&x={x}&y={y}

L.tileLayer('**http://localhost/tileserver/tile.aspx?z={z}&x={x}&y={y}**', {
    minZoom: 7, maxZoom: 16,
    attribution: 'My Tile Server'
}).addTo(map);

any one can nicely explain how the above code can work when we need to load many tiles into map ?

i consult these post and url as follows How to store image tiles in file system for leaflet.js

How TO serve Map tiles from a database using Leafletjs

Using custom map image tiles in LeafletJS?

https://gis.stackexchange.com/questions/82936/how-i-can-load-tilelayer-in-leaflet-framework-using-local-tiles

Thanks

Community
  • 1
  • 1
Thomas
  • 33,544
  • 126
  • 357
  • 626
  • 1
    Possible duplicate of [Map tiles in Leaflet](http://stackoverflow.com/questions/36059324/map-tiles-in-leaflet) – IvanSanchez Mar 22 '16 at 11:44
  • the link you provide not my answer. in my post i asked couple of question and i am looking for person who will read my post and answer accordingly. – Thomas Mar 22 '16 at 11:58

0 Answers0