MapInfo Pro

 View Only
Expand all | Collapse all

#MapInfoMonday : Basic Hotspot Linking

  • 1.  #MapInfoMonday : Basic Hotspot Linking

    Posted 07-15-2024 05:17

    Happy #MapInfoMonday!

    John Ievers standing in for Peter this week, as he enjoys a well-earned rest (I bet he is still checking-in)

    Peter did a really impressive article: Accessing Internet Sites using Hotlinks last year which accessed online oblique imagery of an address location from a choice of 4 directions using Expressions.
    https://community.precisely.com/discussion/mapinfo-monday-accessing-internet-sites-using-hotlinks
    I wanted to take this back to the basic usage for newer users.

    HotLinking
    The Hotlink feature was introduced in MapInfo version 6.0, which was in the year 2000. Quite a lot has changed since then! The initial focus was on linking to display photos or images, rather how we use Google StreetView these days to view images of a particular location.

    Yet the HotLink feature was more a case of taking advantage of Microsoft Windows to identify a known file extension that would open the associated application and the named file. So if you want to link to a jpg image and your PC associates jpg files with Paint, then Paint will open with your chosen file. Once you establish that Windows will handle whatever file you want to open and that you have the application on your PC, you can start thinking about linking to all sorts of additional files that will help users to better understand the many aspects to a location.

    In the first version, you were only allowed a single column/field to store the file name and path. However you were not limited to a single type of file – remember Windows will open whatever the extension relates to. Now you can add multiple columns that contain hotlinks.
    The limit is in storing the path and name or url within 254 characters. Even then, there are tricks to get around that, such as using file locations relative to the table location.

    Open a photo/image associated with a record
    More than just photos
    Once you get beyond the idea of using photos, start thinking about linking to any other sort of data – documents (doc or pdf), spreadsheets, presentations, databases, etc. Then think about opening a MapInfo Table, Workspace or MapBasic applications (.tab, .wor, .mbx). And, of course, the .tab could be opening a whole raft of other file types like .dwg, gpkg, shp, mrr, etc.
    Then there are all the possibilities or linking to web page urls.
    Setting up Hotlinks
    Peter's previous article covered this very well. Select your hotlink layer in the Layer List and from the Map tab, click on the Hotlink Options. 
    Hotlink Options on the Map ribbon
    I used my table called Schools to hotlink to both the local image files and online Ofsted Reports (government inspection reports).
    Hotlink options
    When you do select an object with multiple hotlink choices, you will be presented with another option to choose which hotlink you want.
    Multiple Hotlink choices when you click on your object with the Hotlink feature
    Should this feature become popular, you may wish to consider adding the Hotlink tool to your Map Mini Toolbar attached to your Map Shortcut menu, for easier access to this tool.
    Multiple Hotlinks accessing associated information
    If you have Precisely Spectrum Spatial deployed, you can upload your table to the Spatial Repository and use the Template feature to display images and display the url links in a similar way but embedded in the Information panel. The location of your images will need to be accessible for the Spectrum Spatial application, so those paths may need to be amended. Here, you can share your information over the web via a browser on any suitable device.
    Spectrum Spatial uses the Info panel to access images and display urls
    I hope this has given you some further ideas for hotlinking. 


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


  • 2.  RE: #MapInfoMonday : Basic Hotspot Linking

    Posted 08-01-2024 12:13

    Thanks for this!

    One strange thing I'm finding is it's very inconsistent as to whether the hotlink is clickable from the browser. I can't seem to post images but on a working table the Hotlink tool is active when viewing the browser and the link is blue. On the none working one the Hotlink tool is greyed out and the link isn't blue.

    The tables are identical (other than the name), same data, same TAB file metadata. One works the other not. I've tested multiple times, but can't pin down what makes it work. I suspect there is some obscure bug - perhaps it is the name?



    ------------------------------
    Tom Parker
    GIS Officer
    Cambridgeshire County Council
    Huntingdon
    ------------------------------



  • 3.  RE: #MapInfoMonday : Basic Hotspot Linking

    Posted 08-02-2024 03:53

    I have url links that are underlined and blue and clickable in the browser - but only if they are https://

    They are not active if only http://



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



  • 4.  RE: #MapInfoMonday : Basic Hotspot Linking

    Posted 08-02-2024 08:50
    Edited by Tom Parker 08-02-2024 08:50

    Thanks, http:// is working for me, but even if the same url and the same Hotlink settings are used it seems hit and miss whether the browser Hotlink button is activated. Sometimes even with a copy of same table, but just in a different folder - one works and the other doesn't. It must be a bug.



    ------------------------------
    Tom Parker
    GIS Officer
    Cambridgeshire County Council
    Huntingdon
    ------------------------------



  • 5.  RE: #MapInfoMonday : Basic Hotspot Linking

    Posted 08-02-2024 11:39
    Edited by John Ievers 08-02-2024 11:41

    Hi Tom

    https became a thing in version 2019.3 onwards. Which version are you running?

    Is this a case of selecting the Browser Tab? i.e. is the Explorer Window the active Window. I can get the Hotlink button activated.

    To be fair though - it does say in Hotlink Options on the Map Ribbon that you can activate Hotlink on Labels, on Objects or on Labels & Objects. No mention of Browser....

    Perhaps an idea for the Ideas portal?



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



  • 6.  RE: #MapInfoMonday : Basic Hotspot Linking

    Employee
    Posted 08-05-2024 01:45

    I haven't tested this yet but could it be a question of where the hotlink settings are saved?

    Typically, when you specify the hotlink setting you do this for a layer in a map and this gets saved with your workspace.

    However, you can save these settings with the table - notice the Save option to table metadata checkbox at the bottom of the Hotlink Options dialog.

    With these options saved to the table metadata, the settings aren't only related to a layer, but to a table.

    Does that make a difference?



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



  • 7.  RE: #MapInfoMonday : Basic Hotspot Linking

    Posted 08-06-2024 05:40
    Edited by Tom Parker 08-06-2024 05:40

    Hi,

    Here's a simple example of what I was trying to explain (I can't upload):

    -------------------------

    !table
    !version 300
    !charset WindowsLatin1

    Definition Table
      Type NATIVE Charset "WindowsLatin1"
      Fields 2
        Name Char (100) ;
        URL Char (100) ;
    begin_metadata
    "\IsReadOnly" = "FALSE"
    "\MapInfo" = ""
    "\MapInfo\TableID" = "e00b73e3-342d-486a-b198-2966bacafeac"
    "\ActiveObject" = ""
    "\ActiveObject\Expr" = "URL"
    "\ActiveObject\Mode" = "HOTLINK_MODE_OBJ"
    "\ActiveObject\Relative" = "FALSE"
    "\ActiveObject\Enabled" = "TRUE"
    "\ActiveObject\Alias" = ""
    end_metadata

    -------------------------

    Data

    Name, URL

    Website, https://www.google.com

    File, file://\\path\to\a\file

    -------------------------

    On v2023 with the latest patch if the table is named Test the table works for me and if named Test_Links it doesn't!

    Thanks!



    ------------------------------
    Tom Parker
    GIS Officer
    Cambridgeshire County Council
    Huntingdon
    ------------------------------



  • 8.  RE: #MapInfoMonday : Basic Hotspot Linking

    Employee
    Posted 08-06-2024 08:51

    Hi Tom

    You should be able to upload the files if you zip them and attach the zip file. Otherwise, try sending it to me: peter.moller@precisely.com.

    I tried configuring a table with hotlinks that work with HTTP and HTTPS in the link.

    The link does however not work in the browser.

    Once I check the option to save the settings to the table metadata, the link also appears in the browser window - only in browser windows opened after saving the settings to the table.



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



  • 9.  RE: #MapInfoMonday : Basic Hotspot Linking

    Posted 08-07-2024 21:39

    Hello Peter

    I have been watching this tread with interest and the "Save options to table metadata" you suggested was the key to get my links working in the Browser. Thanks so much

    Keith Holswich - New Zealand



    ------------------------------
    Keith Holswich
    Knowledge Community Shared Account
    ------------------------------



  • 10.  RE: #MapInfoMonday : Basic Hotspot Linking

    Employee
    Posted 08-08-2024 02:34

    Thanks for validating my expectations, Keith.

    John and Tom, can you get to the same result?

    Thanks

    Peter



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



  • 11.  RE: #MapInfoMonday : Basic Hotspot Linking

    Posted 08-08-2024 19:15

    Good morning good people

    I have revisited this matter after re-reading Tom's post about a "hit and miss" scenario and indeed found the same thing here. On testing, and you will like this Peter, I have found a repeatable procedure that identifies and solves this issue as below.

    If I start a Workspace then open a New Browser, the Hotlink field is highlighted blue but is inaccessible.If I go back to the Workspace and use the Hotlink button on ANY object from ANY table that has the Hotlink option, then go back to the Browser, the Hotlink field is now accessible. This works every time whether the "Save options to table metadata" is checked or not.

    So to simplify this test, I tried the following

    Open a Workspace, use the Hotlink button and click on ANY object or label from ANY table that uses the Hotlink connection, then open ANY table in a Browser and the Hotlink field will work.

    This is a process that is repeatable and one that I have tried a dozen times or more this wonderful winters morning on any number of Workspaces and Tables. In the end Peter, checking the metadata box seems to make no difference to me or this procedure. I'm sorry if I was too quick off the mark in my previous response but perhaps as has been previously mentioned, this could be a "bug"? Surely it is not a design feature.

    Good luck everyone - Keith Holswich - New Zealand 



    ------------------------------
    Keith Holswich
    Knowledge Community Shared Account
    ------------------------------