MapInfo Pro

Expand all | Collapse all

Smart Text - layer info?

  • 1.  Smart Text - layer info?

    Posted 03-13-2021 07:40
    Hi,

    a client of mine wishes to try and automate the correct copyright text being automatically added to a layout, based on one of three potential basemap layers being included on the map. Currently the users forget to change it and just use the last one they used rather than the correct one!!!

    There was a discussion 18months ago about using column and layer info, etc but I'm not mapbasic skilled enough to alter it for the above task.

    Any suggestion/examples to copy?

    Thanks

    Nick

    ------------------------------
    Nick Hall
    Mapchester LTD
    nick.hall@mapchester.co.uk
    ------------------------------


  • 2.  RE: Smart Text - layer info?

    Posted 30 days ago
    Hi Nick
    Or name your Template according to the base map being used.
    OK, 3 Templates instead of one but more apparent to the end users when selecting the Template.

    ------------------------------
    John Ievers
    CDR Group
    Hope Valley, United Kingdom
    ------------------------------



  • 3.  RE: Smart Text - layer info?

    Posted 29 days ago
    John,

    that was my suggestion too but the problem was some of the users just have their layout embedded in the workspace they use all the time.  Moving from 3 workspace templates to 3 new layout templates probably wont help as the users will still forget to swap.

    Thanks

    Nick

    ------------------------------
    Nick Hall
    Mapchester LTD
    nick.hall@mapchester.co.uk
    ------------------------------



  • 4.  RE: Smart Text - layer info?

    Posted 30 days ago
    Nick,

    Is the base map always the last layer in the map?
    If not, you will have to do this in a small MapBasic application as you need to loop through all the layers.

    You could create a small function that takes the ID of the window and loops through the layers. If a specific layer is found, the function returns a matching copyright text.

    If it's always the last/bottom layer, you could do this using an IIf/Cond expression using the name of the bottom layer and let this return the matching copyright text.

    Tile Server layers support adding a copyright text which will be shown in the lower right corner of the map window.

    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------



  • 5.  RE: Smart Text - layer info?

    Posted 29 days ago
    Peter,

    I was wondering if they could use the Cond() statement.

    Basically they want to use the OS copyright unless it's the AtoZ or APGB one.  The layer names for those 2 will always be the same.

    I'll have a go and seeing if I can construct the statement but I may get back to you if I'm struggling.  Not being that mapbasic proficient using LayerInfo to query layer names will be a new one for me!

    Thanks

    Nick

    ------------------------------
    Nick Hall
    Mapchester LTD
    nick.hall@mapchester.co.uk
    ------------------------------