Skip to main content

@mapgear/geoapps > Interactions

Interactions class

Provides access to the map interactions of the initialized GeoApps map. Can be accessed through the Map.Interactions-property.

Signature:
export declare class Interactions 

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 Interactions 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>");

// Clear sketch
map.Interactions.ClearSketch();

// Disable Mousewheel Zooming
map.Interactions.DisableMouseWheelZoom();

// Enabled Mousewheel Zooming
map.Interactions.EnableMouseWheelZoom();

// Start selecting feature
map.Interactions.StartSelect();

// Stop selecting feature
map.Interactions.StopSelect();

// Start sketch
map.Interactions.StartSketch(<type>, <options>);

// Stop sketch
map.Interactions.StopSketch();

Events

PropertyModifiersTypeDescription
onSelectCompletedreadonlyGAEvent<I.SelectCompletedEventArgs>Returns on select completed event
onSketchChangedreadonlyGAEvent<I.SketchChangedEventArgs>Triggered when the active sketch changed
onSketchCompletedreadonlyGAEvent<I.SketchCompletedEventArgs>Triggered when a sketch is completed

Methods

MethodModifiersDescription
ClearSketch()Remove the sketched objects from the map
DisableMouseWheelZoom()Allow the user to zoom in/out of the map with the mousewheel
EnableMouseWheelZoom()Block the user to zoom in/out of the map with the mousewheel
StartSelect()Start select interaction
StartSketch(type, options)Start sketching of a specified type
StopSelect()Stops select interaction
StopSketch()Stop the active sketch session