TBC Macros and Extensions

 View Only
Expand all | Collapse all

questions regarding OverlayBag for showing WMTS tiles

  • 1.  questions regarding OverlayBag for showing WMTS tiles

    Posted 22 days ago
    Edited by Ronny Schneider 20 days ago

    Since the TBC crew is unwilling to look into this since literally years, Access is meanwhile able to do it, I'm tinkering on a macro that loads tiles from a WMTS source. 

    The TrimbleMaps background seems to be tied directly to HoopsViewCache, sorting everything out automatically. Hence it would just be a matter of Services.TrimbleMaps having the option to set different tile tokens for the URL. Instead of 0,1,2 it'd need to change TileCol, TileRow, TileMatrix. That's so simple that it is unbelievable it isn't possible after so many years.

    Currently, there doesn't seem to be a way to tweak Services.TrimbleMaps to download Tiles from anything different than TrimbleMaps, I'm running into errors/dead ends.

    I can get me the projects map services with

    tms = TrimbleMapsService(self.currentProject, 23) # don't know why it insists on a zoom level
    als = tms.AvailableServices
    

    But the changes I make to this public list, either by adding a new entry or just changing one of the URL's, won't persist. It is reset the next time I run the macro.

    Since the activeForm.View.ViewCache.TrimbleMapType is just pointing to a GUID from the above AvailableServices list it should just be a matter of making my changes there persistent. Just don't know how.

    It does have some helpers for computing the tile numbers.

    My own code for retrieving the tiles still needs some tuning but works. And I can add them as OverlayGeoImage.

    But the imagery is shown on top of everything else, covering it.

    Is there a way to show OverlayGeoImage tiles in the background, behind all drawing entities? Kind of an UnderlayBag.

    Is it somehow possible to remove entities from an OverlayBag without resetting/rebuilding it? I can avoid adding tiles that exist already, but I also want to remove tiles that are outside the current view, without erasing and rebuilding and reloading all tiles, while optimizing the bags amount of content.

    Or is there another way to add background imagery? I found something like ImageTileNetwork or HoopsCacheView.



    ------------------------------
    Ronny Schneider
    ------------------------------



  • 2.  RE: questions regarding OverlayBag for showing WMTS tiles

    Posted 5 days ago

    🤔



    ------------------------------
    Nelson Hays
    ------------------------------



  • 3.  RE: questions regarding OverlayBag for showing WMTS tiles

    Posted 4 days ago

    This is not WMTS as i.e. provided by Propeller, Google Maps, or other GIS and imagery sources.

    TBC still only supports WMS. Is something different.

    Google "difference wms wfs wmts"



    ------------------------------
    Ronny Schneider
    ------------------------------



  • 4.  RE: questions regarding OverlayBag for showing WMTS tiles

    Posted 4 days ago

    I'm ignorant about the nuts and bolts behind this.

    When TBC launched the WMS support I was excited to search for compatible background map options for things like property owner maps, state highway milepost maps, etc, but never got anything to work... not sure who that functionality was intended for.



    ------------------------------
    Nelson Hays
    ------------------------------



  • 5.  RE: questions regarding OverlayBag for showing WMTS tiles

    Posted 4 days ago

    Me neither, but I do know that Propeller only supports WMTS. Don't know since when exactly. Like the TBC crew, they don't compile decent release notes either. (I know there are TBC release notes, but usually a lot of things are not mentioned in them, hence rather worthless)

    Must be available since at least early/mid 2023 in Propeller.

    Trimble Access was reasonably quick I believe and supports it since 2023.10 which came out in October 2023 (https://help.fieldsystems.trimble.com/trimble-access-release-notes/en/2023.10.htm)

    Nearly 3 years later and TBC still doesn't support an inhouse platform.



    ------------------------------
    Ronny Schneider
    ------------------------------



  • 6.  RE: questions regarding OverlayBag for showing WMTS tiles

    Posted 21 hours ago

    Hi Ronny,

    There's several ways to control the visual depth of images and see the result you want. However, the OverlayBag (the Hoops one, specifically) does not support this capability - it was explicitly designed to draw on top of all other visuals and to not try and figure out which parts of the overlay are supposed to be in front of which other parts of that same overlay.

    Are you able to access and utilize all of the publicly available classes/methods in the code base? Maybe I can try to share a way to achieve the desired visual effect in another way, without using the Overlay. 

    Also - are you able to share the part of your code which inserts the images into the view? We could try and see if there's a convenient way to wire the depth control capability into the overlay.



    ------------------------------
    Arturas Grigorjevas
    ------------------------------