These are chat archives for openseadragon/openseadragon

Oct 2018
Oct 11 2018 15:54

I am a little bit confused with OSD and TMS support. I've already experienced OSD with Dzi and pyramids generated with libvips but what I"m trying to do is displaying a tiled pyramid generated with gdal2tiles.
Here's my xml:

<?xml version="1.0" encoding="utf-8"?>
    <TileMap version="1.0.0" tilemapservice="">
      <SRS>PROJCS["RGF93 / CC43",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4171"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.25],PARAMETER["standard_parallel_2",43.75],PARAMETER["latitude_of_origin",43],PARAMETER["central_meridian",3],PARAMETER["false_easting",1700000],PARAMETER["false_northing",2200000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","3943"]]</SRS>
      <BoundingBox minx="1686428.97600000002421" miny="2197055.74699999997392" maxx="1687491.28399999998510" maxy="2199108.26500000013039"/>
      <Origin x="1686428.97600000002421" y="2197055.74699999997392"/>
      <TileFormat width="256" height="256" mime-type="image/png" extension="png"/>
      <TileSets profile="raster">
        <TileSet href="0" units-per-pixel="13.31200000000000" order="0"/>
        <TileSet href="1" units-per-pixel="6.65600000000000" order="1"/>
        <TileSet href="2" units-per-pixel="3.32800000000000" order="2"/>
        <TileSet href="3" units-per-pixel="1.66400000000000" order="3"/>
        <TileSet href="4" units-per-pixel="0.83200000000000" order="4"/>
        <TileSet href="5" units-per-pixel="0.41600000000000" order="5"/>
        <TileSet href="6" units-per-pixel="0.20800000000000" order="6"/>
        <TileSet href="7" units-per-pixel="0.10400000000000" order="7"/>
        <TileSet href="8" units-per-pixel="0.05200000000000" order="8"/>
        <TileSet href="9" units-per-pixel="0.02600000000000" order="9"/>

Question : how to configure this tileset in OSD as I don't understand which URL OSD needs looking at :

    id:                 'example-inline-configuration-for-tms',
    prefixUrl:          '/openseadragon/images/',
    showNavigator:      false,
    wrapHorizontal:     true,
    zoomPerScroll:      1.2,
    minZoomImageRatio:  0.5,
    tileSources:   [{
        type:       'tiledmapservice',
        tilesUrl:   '',
        width: 256 * 65534,
        height: 256 * 32767

thanks in advance

Oct 11 2018 16:10
has anyone implemented a small viewer coordinate display on top of the viewer in a corner somewhere?
Ian Gilman
Oct 11 2018 16:22
@galoulebougalou Unfortunately I don't know a lot about TMS, but theoretically you should be able to just take the tilesUrl from the example and change it to the URL for the XML you made. You might also need to fiddle with the width and height, but I don't know how to know what the right value is.
@jason-green-io Nothing helpful here?
You could always grab the code from the interactive bit at the bottom of
Oct 11 2018 17:33
I have no idea how to get it to show up on the viewer.
Ian Gilman
Oct 11 2018 17:49
@jason-green-io You should be able to just stick it in a div and use CSS to lay it on top of the viewer.
Use pointer-events: none on the div so it doesn't interfere with mousing.
Anyway, laying it on top of OSD isn't part of the OSD API... it's just regular web stuff.
Oct 11 2018 18:44
@iangilman Thanks. I will try... and let you informed.
Ian Gilman
Oct 11 2018 20:25
@galoulebougalou Please do! I'm always happy to learn more (and hopefully I can be of help).
Oct 11 2018 21:18
Got it working with mouse events .. now for mobile
Ian Gilman
Oct 11 2018 21:22
Excellent :)