TSRE - Download map image for terrtex templates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • longiron
    1000 Post Veteran and Moderator

    • Jan 2007
    • 1453
    • Just south of NYC

    #1

    TSRE - Download map image for terrtex templates

    Has anyone been successful downloading map images as terrain patches? I have been successful getting OSD vector images but not map images. Tried both Google and Mapbox APIs,.
    Chris
    "True rail fans have two favorite railroads. The B&O and one other."
  • eric
    9500 Post Veteran and Administrator



    • Dec 2002
    • 9583
    • NS MP245.4 CNO&TP South District
    • English, SQL
    • General

    #2
    I do it all the time. If you're using TSRE 8, your API key is now separate from the URL in the MapAPI token (MapAPI = yourkey)
    If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

    Comment

    • eric
      9500 Post Veteran and Administrator



      • Dec 2002
      • 9583
      • NS MP245.4 CNO&TP South District
      • English, SQL
      • General

      #3
      These are the three keys that need to be set in the API file for TSRE to pull maps from MapBox:

      //// MapBox
      //// See https://docs.mapbox.com/api/maps/static-images/ for parameter options
      //
      imageMapsUrl = https://api.mapbox.com/styles/v1/mapbox/satellite-v9/static/{lon},{lat},{zoom}/{res}x{res}?access_token=
      MapAPIKey = pk.yadayadayadayadayadayada
      //// MapBox needs this offset setting to be -1:
      imageMapsZoomOffset = -1

      For whatever reason, the zoom levels z17/z18 are different between Google and MapBox. That last offset is only needed for Mapbox and makes the adjustment, and isa token just in case this ever changes for MapBox.... Be sure to comment it out for Google Maps.
      If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

      Comment

      • pwillard
        3000 Post Veteran



        • Nov 1999
        • 3070
        • Cumming Ga
        • ORTS

        #4
        This is an area where my 'existing' documentation is lacking and I need to update it.
        http://www.railsimstuff.com
        Just Blender now, 3DCrafter only when I have to.
        Formerly The Keystone Works (All Permissions Granted)
        Things I work on: https://github.com/pwillard

        Comment

        • eric
          9500 Post Veteran and Administrator



          • Dec 2002
          • 9583
          • NS MP245.4 CNO&TP South District
          • English, SQL
          • General

          #5
          Originally posted by pwillard
          This is an area where my 'existing' documentation is lacking and I need to update it.

          I've been trying to keep a change log in one of the sticky's here, including the list of new tokens added in v8.
          If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

          Comment

          Working...