Skip to main content

@mapgear/geoapps > InformationOverlays

InformationOverlays class

Provides access to the information overlay functionality of GeoApps. Can be accessed through the Map.InformationOverlays-property.

Signature:
export declare class InformationOverlays 

Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the InformationOverlays class.

Example

An example of the usage:

// Connect as anonymous user to a geoapps environment
geoapps.Initialize("<specified tenant>");

// Add the map to a div with element id `map`
var map = geoapps.AddMap("map", "<mapId>");

// Wait till the map loaded, before starting the information overlay
// InformationOverlays
map.InformationOverlays.onLoaded.add(function () {
console.log(map.InformationOverlays.Items);
});

// Add information overlay
map.InformationOverlays.Add(<informationOverlay>);

// Remove information overlay
map.InformationOverlays.Remove(<informationOverlay>);

Events

PropertyModifiersTypeDescription
onAddedreadonlyGAEvent<InformationOverlayAddedEventArgs>Triggers when an information overlay is added
onLoadedreadonlyGAEvent<GAEventArgs>Triggers when all information overlays are loaded from the server
onRemovedreadonlyGAEvent<InformationOverlayRemovedEventArgs>Triggers when an information overlay is removed

Properties

PropertyModifiersTypeDescription
CountreadonlynumberRetrieve the amount of overlays available
ItemsreadonlyInformationOverlay[]Get all information overlays

Methods

MethodModifiersDescription
Add(informationOverlay)Add an information overlay to the map
on(event, eventHandler)Bind to an event (legacy purposes)
Remove(informationOverlay)Remove the information overlay from the map. If it is not found, nothing happens and the remove-event isn't triggered.