What are Markers?

Markers are visual icons that are placed at a specific location (latitude/longitude or address). These markers are viewed in our AerialSphere viewer, and will remain at the given location no matter what sphere (panorama) you are viewing from. There are a few different kinds of markers you will see referenced through our documentation, and although they are all similar, they have a few key differences.

What are the different types of markers?

Icon (default)

This is the original marker, and the default to use when you want to quickly mark a location or point of interest. The default icon used is a simple blue marker. You can change both the color and the icon used when creating the marker.

Logo

This marker uses a Logo instead of an Icon. This is essentially the same as the Icon marker described above, except you can NOT change the color of the logo. You can choose which logo is used when creating the marker:

Text

This marker doesn’t use an image, but shows text for the marker instead. There is currently a ~12 character limit on the text you can enter, but this will be improved in the future.

Instead of using a string, you will pass an object with 2 mandatory key/value pairs and 4 optional pairs to the icon parameter of the marker:

icon: {
  type: This must be the string “text” for the marker to correctly show your text instead of an image.
  iconText: This is the string of text you want the marker to show.
  fontSize (optional): The font size of the text, given in pixels. Default: 14.
  textColor (optional): The color of the text. Default: white.
  textShadow (optional): This can be used to give text a border. Default: black border. This needs horizontal shadow, vertical shadow and optional blur radius and color similar to the text-shadow in CSS.
  font (optional): Font family of the text. Default: "'Open Sans', sans-serif, arial"
}

Custom

This marker allows you to use your own image instead of an icon or logo. This is useful when you want to use an icon or logo that AerialSphere doesn’t have in their library. The image you want to use must be hosted online and accessible via a url. Although custom markers are created in a similar fashion to Icon markers, you must add a few details beyond just the name of the icon to use. Instead of using a string, you will pass an object with 4 key/value pairs to the icon parameter of the marker:

icon: {
  url: The string of the url pointing to your image to use
  teardrop: This must be either true or false, indicating whether the anchor point of the image will be at the bottom (true) or the center (false)
  height: The height of the image, given in pixels
  width: The width of the image, given in pixels
}

How to add markers?

Although adding a marker is covered in the “addMarker” documentation, there are some things to keep in mind when adding markers:

Marker Interactions

There are a few different ways that you can configure marker interactions to get the functionality you are looking for. Almost all of these are done when you are creating a marker.