Articles and Tutorials

GSPointFeature

GSPointFeature represents a point of interest (POI) feature.
Object
|
+--GSPointFeature
Field Summary
 GSPoint coordinate
          The coordinate this point feature is centered on
 String district
          The district containing this point feature
 String id
          Unique id for this point feature
 String infoHtml
          HTML markup to display in this feature's info window.
 String name
          The name of this point feature
 String region
          The region containing this point feature
 String suburb
          The suburb containing this point feature
 
Constructor Summary
GSPointFeature (<Object> params)
            Creates a new GSPointFeature that is initialized with the properties specified in the params associative array.
 
Method Summary
 Object addEventHandler(<String> eventType, <Function> func)
           Calls the handler function provided when the given event is triggered on this feature.
 GSPointFeature clone()
           Creates a copy of this feature
 GSBounds getBounds()
           Gets the minimum bounding box necessary to contain this map feature
 boolean isDraggable()
           Returns a boolean value indicating if this point feature is draggable
 boolean isVisible()
           Returns a boolean value indicating the visibility of this point feature
 void openMapBlowup(<int> zoomLevel)
           Opens a blowup map centered on this feature.
 void removeEventHandler(<Object> token)
           Removes the event handler function represented by the token parameter from this feature
 void setIcon(<GSIcon> icon)
           Sets the icon used by this point feature
 void setVisible(<boolean> visible)
           Sets the visibility of this point feature
 void showInfoWindow(<String> html)
           Displays the specified HTML markup in the info window above this feature
 String toString()
           Outputs this features properties as a String

Field Detail

coordinate

GSPoint coordinate
    The coordinate this point feature is centered on

district

String district
    The district containing this point feature

id

String id
    Unique id for this point feature

infoHtml

String infoHtml
    HTML markup to display in this feature's info window.

name

String name
    The name of this point feature

region

String region
    The region containing this point feature

suburb

String suburb
    The suburb containing this point feature
Constructor Detail

GSPointFeature

GSPointFeature(<Object> params)
    Creates a new GSPointFeature that is initialized with the properties specified in the params associative array. Of these properties the icon property must be specified if a custom icon is to be used, otherwise the point feature will default to using the default SmartFIND icon type.
  •  
    •  
      • id - a unique id for this point feature
      • coordinate - the coordinate this point feature is centered on
      • icon - an instance of GSIcon used to represent this feature visually on the map
      • name - the name of this point feature
      • suburb - the suburb containing this point feature
      • district - the district containing this point feature
      • region - the region containing this point feature
    • params - an associative array of named arguments used to initialize the point feature object, the following parameters may be specified:
  • Parameters:
Method Detail

addEventHandler

Object addEventHandler(<String> eventType, <Function> func)
  •  
    • click - the click event occurs when the mouse button is clicked over the feature.
    • mousedown - the mousedown event occurs when the mouse button is pressed over the feature
    • mouseup - the mouseup event occurs when the mouse button is released over the feature
    • mouseover - the mouseover event occurs when the mouse is moved onto the feature
    • mousemove - the mousemove event occurs when the mouse is moved while it is over the feature
    • mouseout - the mouseout event occurs when the mouse is moved away from the feature
  • Calls the handler function provided when the given event is triggered on this feature. Any DOM Level 2 mouse event type may be specified for the eventType argument:
  •  
      eventType - the event that should trigger the handler function
      func - the function to be invoked when the event is triggered
  • Parameters:

clone

GSPointFeature clone()
    Creates a copy of this feature
  •  
      a clone of this feature
  • Returns:

getBounds

GSBounds getBounds()
    Gets the minimum bounding box necessary to contain this map feature
  •  
      the bounds of this map feature
  • Returns:

isDraggable

boolean isDraggable()
    Returns a boolean value indicating if this point feature is draggable
  •  
      true if this point feature is draggable
  • Returns:

isVisible

boolean isVisible()
    Returns a boolean value indicating the visibility of this point feature
  •  
      true if this point feature is currently visible on the map
  • Returns:

openMapBlowup

void openMapBlowup(<int> zoomLevel)
    Opens a blowup map centered on this feature.
  •  
      zoomLevel - an integer value from 0 (maximum zoom in) to 16 (maximum zoom out)
  • Parameters:

removeEventHandler

void removeEventHandler(<Object> token)
    Removes the event handler function represented by the token parameter from this feature
  •  
      token - a token identifying the event handler to be removed
  • Parameters:

setIcon

void setIcon(<GSIcon> icon)
    Sets the icon used by this point feature
  •  
      icon - the icon to set
  • Parameters:

setVisible

void setVisible(<boolean> visible)
    Sets the visibility of this point feature
  •  
      visible - true if this feature should be visible on the map
  • Parameters:

showInfoWindow

void showInfoWindow(<String> html)
    Displays the specified HTML markup in the info window above this feature
  •  
      html - the HTML markup to display in the info window. If not provided the value of this feature's infoHtml property will be usedi
  • Parameters:

toString

String toString()
    Outputs this features properties as a String
  •  
      this features properties as a String
  • Returns: