MMap

version 0.2

Class: MMap.Marker.Core

This class is an abstract class in the descendent class of the marker.
An original marker can be defined by succeeding to this class.

Extends:

MMap.OverlayView

Method: constructor

Constructor of marker.

Syntax:

var marker = new MMap.Marker.Core(options);

Arguments:

  1. options - (mixed) Option of marker

Options:

  • map - (Map) Map object that displays marker
  • className - (string) Style applied to marker (class name of CSS)
  • position - (LatLng) Coordinates position of marker
  • zIndex - (number) The order of displaying marker
  • visible - (boolean) State of display of marker
  • active - (boolean) Active state of marker

Method: _update

The content of the marker's display is updated.
This method is called in the draw method and the refresh method by an abstract method.
Original update processing can be defined by doing this method in override.

Method: setDefaultZIndex

The order of displaying the marker is initialized.
It is displayed from the marker of latitude with a high marker of low latitude to previous as shown in the explanation of MarkerOptions.

Syntax:

marker.setDefaultZIndex();

Method: draw

It draws in the marker.

Syntax:

marker.draw();

Method: refresh

The content of the marker's display is updated.
Please use the draw method to change when you want to update the position where the marker is displayed.

Syntax:

marker.refresh();

Method: getZIndex

The order of displaying the marker is acquired.

Syntax:

var zIndex = marker.getZIndex();

Returns:

(number) The order of displaying marker

Method: getPosition

Coordinates of the marker are acquired.

Syntax:

var position = marker.getPosition();

Returns:

(LatLng) Coordinates object

Method: setZIndex

The order of displaying the marker is specified.

Syntax:

marker.setZIndex(100);

Arguments:

  1. index - (number) The order of displaying marker

Returns:

(object) Marker object

Method: setPosition

Coordinates that arrange the marker are set.

Syntax:

var position = new google.maps.LatLng(35.6666870, 139.731859);
marker.setPosition(position);

Arguments:

  1. position - (LatLng) Coordinates that arrange marker

Returns:

(object) Marker object

Method: setActive

Active of the marker is changed.

Syntax:

marker.setActive(true);

Arguments:

  1. value - (boolean) If true is specified, it becomes active.

Copyright(c) 2010 Noritaka Horio All Rights Reserved.