Hexagon Geospatial
MENU

Developers Knowledge Base

WebGIS enables powerful geospatial web applications and services that securely share your organization’s rich geospatial data, and provides tools to deeply examine spatial data and create value added products, on demand.
Showing results for 
Search instead for 
Do you mean 

Embedding Geospatial Portal

by Technical Evangelist on ‎09-09-2015 04:08 AM - edited on ‎04-06-2017 07:11 AM by Technical Evangelist (466 Views)

Popup

Portal can be easily embedded in a popup with keeping the communication between the popup and the parent window:

Example below creates popup window with Portal and synchronizes map between parent window and the popup. Of course it is easy to make a portal popup from any other application or page.


var spec="width=640,height=480,toolbar=no,status=no",
    popupname = "portal2",
    url = "Map.aspx";

// execute code when popup.$GP is available
function run (popup, fn) {
    if (popup.$GP) {
        fn.call(null, window, popup);
    } else {
        popup.onload = function () {
            fn.call(null, window, popup);
        }
    }
}

var popup = window.open(url, popupname, spec, true);

run(popup, function (parent, child) {
    // fiddle with child $GP settings
    child.$GP.settings.set({
        showNavigator: false,
        showCoords: false,
        showScale: false
    });
    // synchronize parent with child
    child.$GP.events.mapMoved.register({
        handler: function () {            
            parent.$GP.map.zoom(child.$GP.map.info().bbox);
        }
    });
});

 

And how does it look like?

Embedding_1.png

IFrame

Examples.aspx contain two examples that concern embedding portal in an iframe element.


Main concern when embedding portal in an iframe is communication between the hosting page and the portal. Fortunately both examples demonstrate how to perform that.

 

Evaluation of FeatureInfo on the hosting page

This example evaluates results of the feature info operation into a table within hosting page.


Take a look at the source code of \"Embedding01.htm\"

Embedding_2.png

 

Synchronizing two portals

This example demonstrate how to embed more than 1 portal.


Take a look at the source code of \"Embedding02.htm\"

Embedding_3.png

Overview