Skip to main content

Custom Module Broke when upgrading to latest release

Comments

4 comments

  • Permanently deleted user
    Hi Laura,

     

    The new version of the viewer switched to AMD (asynchronous module definition), and it now needs a "require" element for all modules that get loaded.  It sounds to me like you need to add one.  Please take a look at this KBA:

     

    https://support.geocortex.com/essentialsGSCkba?sub-nav=kba&main-nav=essentials&/feedtype=SINGLE_ARTICLE_DETAIL&criteria=BESTANSWERS&id=kA360000000PPcMCAW

     

    For more details on that.  

     

    Thanks!

     

    Danny
    0
  • Permanently deleted user

    Thanks Danny!

     

    I checked and the code embedded in the Viewers is a little different in that it doesn't reference a GVH namespace. It looks like they created a custom name space for this module, so i'm not sure how to modify it.

     

    In the Libraries section the code looks like this currently:

     

          {

     

            "id": "HistoricalPhotos_Modules",

     

            "uri": "{ViewerConfigUri}../../Compiled/HistoricalPhotos_Modules_out.js"

     

          }

     

     

    In the Modules section the code looks like this currently:

     

          {

     

            "libraryId": "HistoricalPhotos_Modules",

     

            "moduleName": "HistoricPhotosMapTip",

     

            "moduleType": "geocortex.services.fortWorthTexas.historicPhotosMapTip.HistoricPhotosMapTipModule"

     

          }
    0
  • Permanently deleted user
    And within the Maptips module, which is what this costume Module replaces, it looks like below:

     

          {

     

            "moduleName": "MapTips",

     

            "moduleType": "geocortex.essentialsHtmlViewer.mapping.modules.maptips.MapTipsModule",

     

            "configuration": {

     

              "allowMultiple": false,

     

              "contentField": "longDescription",

     

              "webMapFeaturePresenter": {

     

                "force": true,

     

                "featurePropertyName": "currentFeature",

     

                "view": {

     

                  "markup": "Modules/HistoricPhotosMaptip/HistoricPhotosMapTipView.html",

     

                  "type": "geocortex.services.fortWorthTexas.historicPhotosMapTip.HistoricPhotosMapTipView",

     

                  "libraryId": "HistoricalPhotos_Modules"

     

                },

     

                "viewModel": {

     

                  "type": "geocortex.services.fortWorthTexas.historicPhotosMapTip.HistoricPhotosMapTipViewModel",

     

                  "libraryId": "HistoricalPhotos_Modules"

     

                }

     

              },

     

     
    0
  • Permanently deleted user
    Hi Laura,

     

    If it's using a custom namespace, then I'm thinking we may need to create a new AMD namespace for it.  Since that module was created before we migrated to AMD, it's unlikely that one exists.

     

    That being said, since it's replacing the map tips, you might be able to use one of these:

     

    Mapping/modules/MapTips/MapTipContent

     

    Mapping/modules/MapTips/MapTipContentViewModel

     

    I hope that helps!  Please let us know how it goes!

     

    Thanks,

     

    Danny
    0

Please sign in to leave a comment.