Tile URL-Function

  • Pleppo
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 8 months ago #12227 by Pleppo
Replied by Pleppo on topic Tile URL-Function
Hi,

wow, that looks very good !! :-)
It can work.
The data must be in the correct format / in the database.
Maybe I still have to adjust my format of the data?

It must be created from a gpx file (?) Or it is only a Tile function needed?

On my test page I have this card in it including administrative Boundary.
Then comes the MTB layer. So far the theory. :-)
simon.sommerfugl.de/index.php/zhuk

:-)

File Attachment:

File Name: test.zip
File Size:251 KB
  • Please Log in or Create an account to join the conversation.

    More
    5 years 8 months ago #12228 by Dima
    Replied by Dima on topic Tile URL-Function
    It is tile function. As I wrote - it is grid layer.
    Just create path and enter function into grid layer tab definition.
    On your page I can see GPX layer for boundaries. It looks good.

    I don't understand about data format. As for grid - I create it and compare with your example. I checked a few territories and got the same result.

    Don't forget support my developments: post review in JED , donate , help with translation ;)

    Please Log in or Create an account to join the conversation.

    More
    5 years 8 months ago #12229 by Dima
    Replied by Dima on topic Tile URL-Function

    Don't forget support my developments: post review in JED , donate , help with translation ;)

    Please Log in or Create an account to join the conversation.

    More
    5 years 8 months ago - 5 years 8 months ago #12230 by Dima
    Replied by Dima on topic Tile URL-Function
    I did with GPS coordinates

    joomla.zhuk.cc/index.php/zhosmmap-main/o...in-map-with-clusters

    I need to check and fix my code to decoding for 0 meridian. I'll fix it, but you use coordiantes converting too.

    Just use my converting function

    Here Create Function code
    Code:
    function(coords) { var tile = L.DomUtil.create('canvas', 'leaflet-tile'); var ctx = tile.getContext('2d'); var size = this.getTileSize() tile.width = size.x tile.height = size.y // calculate projection coordinates of top left tile pixel var nwPoint = coords.scaleBy(size) // calculate geographic coordinates of top left tile pixel var nw = map.unproject(nwPoint, coords.z) // will not create white background //ctx.fillStyle = 'white'; //ctx.fillRect(0, 0, size.x, 30); //ctx.fillStyle = 'black'; var vx = " " + coords.x; var vy = " " + coords.y; ctx.fillText('x:' + vx + ', y:' + vy + ', zoom: ' + coords.z, 100, 15); vx = " " + Convert_Latitude_Decimal2DMS(nw.lat); vy = " " + Convert_Longitude_Decimal2DMS(nw.lng); ctx.fillText(vx, 10, 15); ctx.fillText(vy, 10, 25); ctx.strokeStyle = 'black'; ctx.beginPath(); ctx.moveTo(0, 0); ctx.lineTo(size.x, 0); ctx.lineTo(size.x, size.y); ctx.lineTo(0, size.y); ctx.closePath(); ctx.stroke(); return tile; }

    Don't forget support my developments: post review in JED , donate , help with translation ;)
    Last edit: 5 years 8 months ago by Dima.

    Please Log in or Create an account to join the conversation.

    • Pleppo
    • Topic Author
    • Offline
    • Senior Member
    • Senior Member
    More
    5 years 8 months ago #12235 by Pleppo
    Replied by Pleppo on topic Tile URL-Function
    Hello Dima,
    Many thanks for the help!
    Did you get my private email last night? There the list is correct.
    You're right, if I want to put the grid as a shape like the Brandenburg gpx file over the OSM, I have to convert the coordinates back to another format.
    Maybe that's what's going on here:
    www.gpsvisualizer.com/convert_input
    from CSV to gpx

    Please Log in or Create an account to join the conversation.

    • Pleppo
    • Topic Author
    • Offline
    • Senior Member
    • Senior Member
    More
    5 years 8 months ago #12237 by Pleppo
    Replied by Pleppo on topic Tile URL-Function
    :-) yes, your Tile-Layer is perfect. See:
    simon.sommerfugl.de/index.php/zhuk
    and so it should also work with the MTB / TK25 grid.
    Example here:
    www.orchids.de/haynold/tkq/KoordinatenErmittler.php
  • Please Log in or Create an account to join the conversation.

    Time to create page: 0.196 seconds
    Powered by Kunena Forum