Example #1
0
def getLink(tiles, childIdx):
    zoom, x, y = childIdx
    ctx = {
        'name': '{}/{}/{}'.format(zoom, x, y),
        'kmlUrl': '../../{}/{}/{}.kml'.format(zoom, x, y),
    }
    ctx.update(tileBoundsLonLat(*childIdx))
    return LINK_TEMPLATE.format(**ctx)
Example #2
0
def getLink(tiles, childIdx):
    zoom, x, y = childIdx
    ctx = {
        'name': '{}/{}/{}'.format(zoom, x, y),
        'kmlUrl': '../../{}/{}/{}.kml'.format(zoom, x, y),
    }
    ctx.update(tileBoundsLonLat(*childIdx))
    return LINK_TEMPLATE.format(**ctx)
Example #3
0
def getTileKml(tiles, idx):
    imgPath = tiles[idx]
    zoom, x, y = idx
    ctx = {
        'name': '{}/{}/{}'.format(zoom, x, y),
        'links': getChildLinks(tiles, idx),
        'drawOrder': zoom,
        'imageUrl': os.path.basename(imgPath),
    }
    ctx.update(tileBoundsLonLat(*idx))
    return TILE_TEMPLATE.format(**ctx)
Example #4
0
def getTileKml(tiles, idx):
    imgPath = tiles[idx]
    zoom, x, y = idx
    ctx = {
        'name': '{}/{}/{}'.format(zoom, x, y),
        'links': getChildLinks(tiles, idx),
        'drawOrder': zoom,
        'imageUrl': os.path.basename(imgPath),
    }
    ctx.update(tileBoundsLonLat(*idx))
    return TILE_TEMPLATE.format(**ctx)