Summary

Classes


Class deCarta.Mobile.Image

Images (which are inherited from deCarta.Mobile.OverlayObjects can be added to map overlays (deCarta.Mobile.MapOverlay). An Image defines two positions on the map: topLeft and bottomRight, which indicate the corners of the image on the map.
The image will scale when zoomed to maintain its position.
You can also provide a range for valid zoom levels at which to display the image.
Example:

          
  var image = new deCarta.Mobile.Image({
      topLeft: new deCarta.Mobile.Position(37, -122),
      topRight: new deCarta.Mobile.Position(37.5, -122.5),
      minZoom: 10,
      maxZoom: 13,
      src: 'prettyImage.jpg'
  });
  
  //assuming mapOverlay is a mapOverlay object, attached to a map
  mapOverlay.addObject(image);
  
 

Class Summary
Constructor Attributes Constructor Name and Description
 
An OverlayObject used to display an Image on a MapOverlay
Method Summary
Method Attributes Method Name and Description
 
Retrieve the geographic position of the top-left corner of the image.
 
Retrieves the size of the image, in meters
 
setPosition(position)
Sets the geographic position of the top-left corner of the image.
Class Detail
deCarta.Mobile.Image(options)
An OverlayObject used to display an Image on a MapOverlay
Parameters:
{object} options
Options. May contain one or more of the following:
  • deCarta.Mobile.Position topLeft: Geographic position of the top-left of the image on the map - required
  • deCarta.Mobile.Position btmRight: Geographic position of the bottom-right of the image on the map - required
  • (int) minZoom: optional, default 1
  • (int) maxZoom: optional, default 20
  • (string) cssClass: css class that will be applied to the element
  • (int) opacity: opacity of the image [0 (transparent) to 100 (opaque)] default=75
  • (string) src: the image src, can be a reference to an image file or a data URI
See:
deCarta.Mobile.MapOverlay
deCarta.Mobile.OverlayObject
Method Detail
{deCarta.Mobile.Position} getPosition()
Retrieve the geographic position of the top-left corner of the image.
Returns:
{deCarta.Mobile.Position} Geographic position of the top-left corner of the image

{width|height} getSize()
Retrieves the size of the image, in meters
Returns:
{width|height} A structure containing width and height

setPosition(position)
Sets the geographic position of the top-left corner of the image.
Parameters:
{deCarta.Mobile.Position} position
Position of the top-left corner of the image

Documentation generated by JsDoc Toolkit 2.1.0 on Fri Nov 04 2011 12:27:12 GMT-0700 (PDT)