GEOCODING & SEARCH
REST
Android
iOS
DIRECTIONS & NAVIGATION
REST
JavaScript
Android
iOS
POSITIONING
Overview
ILP SDKs

Class: GSSMarker

GSSMarker(gssLatLng, options)

A class that holds latitude, longitude and options to draw a marker.

Constructor

new GSSMarker(gssLatLng, options)

Parameters:
Name Type Description
gssLatLng GSSLatLng

gssLatLng contains the position, where marker needs to be drawn.

options JSONObject

that contains icon properties.

Examples

GSSMarker instantiation with default marker image.

var gssLatLng = new gssmaps.GSSLatLng(lat, lng);
var gssMarker = new gssmaps.GSSMarker(gssLatLng);

GSSMarker instantiation with custom image.

var gssLatLng = new gssmaps.GSSLatLng(lat, lng);
var gssIcon = new gssmaps.GSSIcon("assets/bus-marker.png", [32, 32], [16, 32]);
var options = {"icon" : gssIcon};
var gssMarker = new gssmaps.GSSMarker(gssLatLng, options);

Methods

bindPopupContent(content)

Binds the content to be shown, on click of the marker.

Parameters:
Name Type Description
content String

The popup content.

getLatLng() → {GSSLatLng}

Returns lat lng object.

Returns:

The wrapped lat lng object.

Type
GSSLatLng

getMarkerId() → {Number}

Returns Id of the marker dropped on map.

Returns:

Id of the marker.

Type
Number

getOptions() → {JSONObject}

Returns options object that holds the custom marker properties.

Returns:

The options object with custom marker properties.

Type
JSONObject

openPopup()

Opens the popup with the content set, in bindPopupContent(). This is an alternative to click on marker.