The current map being displayed
The Venue data this MapView is using.
Makes a single Polygon hoverable/clickable. Polygons you haven't called this on will be treated as non-interactive and not respond to any mouse events.
Makes all polygons attached to a location hoverable/clickable. Polygons you haven't called this on will be treated as non-interactive This is a convenience function for calling MapView.addInteractivePolygon on all the polygons attached to all locations. You may also make individual polygons interactive with the addInteractivePolygon method instead of, or in addition to this method.
A list of Location types to skip. All locations of this type will be exluded from becoming interactive
An array of Location objects. Overrides the default of making all locations interactive, and instead applies to only the locations specified here.
Resets ALL Polygons you have changed with MapView.setPolygonColor back to their original color. The hover effect will still be present if the user is currently hovering over a Polygon.
Resets a Polygon back to it's original color. If the user is hovering over a polygon, it will still have the hover effect.
The Polygon/Polygon ID to reset.
Attach any HTML to a MappedinNode, and have the marker interact and collide with smart labels and tooltips
Add a ThreeJS object to the screen to be rendered on the marker layer.
This creates a tooltip that allows you to pass dynamic content which will attempt to position around an anchor in 3D space. The tooltip will be positioned based on one of four AnchorTypes (top, bottom, left, right).
options.defaultAnchorType
and options.enabledAnchorTypes
should be one of the constants from Mappedin.Tooltip.ANCHOR
options.defaultAnchorType
will override options.enabledAnchorTypes
if that anchor was disabled it will be automatically re-enabled
The Tooltip you created, which has already been added to the scene.
Destroy instance and clean up memory
Draws an entire path. It takes a list of Nodes and will break them into separate pathSegments on every map change, putting the resultant segment on the right Map.
An array of Nodes, probably from a Node's MappedinNode.directionsTo call.
An array of pathSegment ids.
Let any image attached to a Polygon attached to a Location flip 180 degrees with the camera so it's always upright.
A list of Location types to skip, if for some reason there are Locations that have logos that shouldn't flip.
An array of Location objects, or Location IDs. If excludeTypes is not sufficient you can explicitly set the Locations you are marking to flip. You can also call MapView.enableImageFlippingForPolygon manually for every polygon you care about instead.
Mark a specific Polygon so, if it has an image, it rotates with the camera.
The ID of the Polygon who's image (if any) should rotate.
The how much the image has been rotated so that it's "up". Determined from the Polygon object itself typically, but can be set manually if needed.
Get Nearest Node to a screen coordinate x, y, map. Useful for doing directions from any place on the map
Map of MapId
Finds all polygons that contain the specified MappedinCoordinate. If multiple polygons are stacked on top of each other, the array of polygons returned will be in the order of top to bottom.
By default, this only considers interactive polygons.
The MappedinCoordinate to check
Specifies if all polygons should be included rather than just interactive polygons.
MappedinPolygon[]
Finds the main Location associated with a Polygon. This means a Location attached to the Polygon that has no parents, or, if there are none of those, a Location nearest the top of some hierarchy that does have the Polygon attached.
This means if there are multiple hierarchies of Locations attached to the Polygon, the one that gets returned is not guaranteed to be what you want.
The Polygon you want the primary Location of.
Label all Locations using 2D floating labels
Labels all Locations, in order of distance from the center of the Map. See MapView.labelPolygon for available label options. The options are all optional, as the text and Polygon properties will be set for each Location.
Labels a specific Polygon using a floating 2D label that remains the same size regardless of zoom
Labels a specific Polygon (or area of 3D space) with a TextLabel that lives in 3D space. That means it will be smaller when the camera is further away, and the angle you see it at will change with the camera. The text will flip 180 degrees when the camera rotates so it's never totally upside-down.
It also sets the hover label (in 2D and 3D). Many of these options do nothing in 2D, as TextLabels are not supported, but it won't break anything.
You must provide text, and either a Polygon, or a canvasBounds and height
As the name suggests, all polygons will have their "closed" state set to "opened".
Remove all interactive polygons
Removes all labels from all Maps.
Removes all Markers (from all Maps, not just the current one).
Removes all pathSegments from all Maps.
Remove all ThreeJS marker from the scene.
Remove all tooltips
Makes a polygon no longer hoverable/clickable.
The previously interactive Polygon/Polygon ID to make non-interactive.
Remove Marker
Remove a path by id
Remove a ThreeJS marker from the scene. This will be a no-op if the map object associated with the marker has been destroyed.
marker to remove
true if the marker was removed, false if the marker or its map had already been removed
Removes a {@link Tooltip} you have added previously.
A Tooltip that has previously been returned from MapView.createTooltip.
Sets the clear color of the Map something else, it you want it to fit it more with your website. Otherwise the div will be white where there is no Map visible.
The color to use. Not an HTML color name.
Opacity between 0 and 1.
Sets the color for hovering over polygons
Change the currently displayed Map to a new one.
The Map ID or Map Object to change the Map to.
Given a polygon/polygon id, set it to a specific color, and set any text label associated with that polygon to another color.
The Polygon/Polygon ID to change the color of.
The color to use.
Unsubscribe from SDK events
The scene only renders when something has changed. This should be something a 3rd party developer doesn't need to worry about, but if you are doing something weird, or have your own special tween for something, you will want to call this function. You can call it as often as you want, it just sets a flag that we need to render again, and renders a few frames if we weren't already doing that. Ignored in 2D.
A polygon can have state that renders the concept of being "closed", which is a generic blanket term that can be used in general to inform the user that they can expect this polygon to not be servicing customers.
If true, the polygon will be marked as being closed. If false, the polygon will be marked as being open.
If true, a convenience parameter that is the converse of options.closed
. Note that if both are present, closed
will receive higher precedence.
The polygon or polygon id whose state is being updated.
The div MapView is using.
container {Div}