Class Images

Images can enhance the fidelity of an indoor map. They can be used to add custom branding, highlight important features, or provide additional information to users. Images can be placed on any Door, Space, or Coordinate on the map and given a verticalOffset to control the height at which the image is displayed.

This class is accessed using MapView.Images.

JPEG and PNG images are supported. It's important to consider the size of all unique image files displayed on a map at one time. Using many unique images may cause instability on mobile devices with limited GPU memory. The Mappedin SDK will cache and reuse images that have the same URL, resulting in reduced memory usage.

The following calculations illustrates how much memory is used for a given image:

Formula: width * height * 4 bytes/pixel = memory used

512 x 512 Pixel Image: 512px * 512px * 4 bytes/pixel = 1MB

4096 x 4096 Pixel Image: 4096px * 4096px * 4 bytes/pixel = 64MB

Refer to the Images Guide for more information and interactive examples.

Methods

  • Adds an image to the map.

    Parameters

    Returns Image

    The created Image, or undefined if creation failed.

    // Add an interactive {@link Image} to the map with custom HTML content.
    mapView.Images.add(coordinate, '<div>Image Content</div>', { interactive: true });
  • Removes a image from the map.

    Parameters

    • image: Image

      {Image} The Image which should be removed.

    Returns void

    mapView.Images.remove(image);
    
  • Remove all the images from the map.

    Returns Image[]

    mapView.Images.removeAll();
    
MMNEPVFCICPMFPCPTTAAATR