Grab GIS attribute from embedded HTML5 viewer map
Hello Geocortex JavaScript coder gurus,
I'm calling on you folks for some help, I have a html5 map embedded in a iframe. I would like to take attribute values from a feature click and pass it to the parent page so I can do more "stuff" with it. does anybody have a code sample they can share or a publicly viewable application doing something simular, that I can take a look at? getting me past this hump would be a really big help and I would be willing to share the final product code with the GeoCortex community to help others.
-Alex
-
Thank You Jason, I will post a status update to share my results with others, as I'm sure this would be a fairly useful example for people.
-Alex
0 -
Hello Again, I think I'm missing a important piece of the puzzle here, below is a outline of the steps I have done but my custom command fails to execute on a feature click. Could you clarify that below is what you meant.
so. in my Desktop.json.js I added the FeatureClickHandler to the onFeatureClick like so..
"moduleName" : "Map",
"moduleType" : "geocortex.essentialsHtmlViewer.mapping.modules.map.MapModule",
"configuration" : {
"panDuration" : 350,
"panRate" : 50,
"zoomDuration" : 500,
"zoomRate" : 50,
"onClick" : [ "InvokeMapTip", "ClearDefaultHighlights" ],
"onFeatureClick" : [ "ShowMapTip","FeatureClickHandler" ], ......Then I added the register to the Index.html like so..
viewer.eventRegistry.event("SiteInitializedEvent").subscribe(this, function () {
// If the splash duration has elapsed already, dismiss the splash screen.
if (!splashDuration) {
dismissSplashScreen();
}
siteInitialized = true;
});
viewer.command("FeatureClickHandler").register(this, function (feature) { alert("test!"); });
viewer.initialize();
Thank you-Alex
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare