Class Index | File Index

Classes


Class khtml.maplib.overlay.MarkerOptions


Defined in: Marker.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
khtml.maplib.overlay.MarkerOptions(animation, clickable, cursor, draggable, flat, icon, map, optimized, position, raiseOnDrag, shadow, shape, title, visible, zIndex)
generates a MarkerOptions-object
options for a marker
Class Detail
khtml.maplib.overlay.MarkerOptions(animation, clickable, cursor, draggable, flat, icon, map, optimized, position, raiseOnDrag, shadow, shape, title, visible, zIndex)
generates a MarkerOptions-object
options for a marker
 

 // define position
 var point = new khtml.maplib.LatLng(50.875311, 0.351563);
 
 // define icon
 var image = new khtml.maplib.overlay.MarkerImage(
	  'img/image.png',		// url
	  {width: 20,height: 20},	// size
	  {x: 0,y:0},			// origin
	  {x:10,y:20}			// anchorPoint
 );
 
 // define shadow
 var shadow = new khtml.maplib.overlay.MarkerImage(
	  'img/shadow.png',		// url
	  {width:34,height:20},		// size
	  {x:0,y:0},			// origin
	  {x:10,y:20}			// anchorPoint
 );
 
 // define shape
 var shape = {
	  coord: [14,0,15,1,16,2,17,3,18,4,19,5,19,6,19,7,19,8,19,9,19,10,19,11,19,12,19,13,19,14,18,15,17,16,16,17,15,18,13,19,5,19,4,18,2,17,2,16,1,15,0,14,0,13,0,12,0,11,0,10,0,9,0,8,0,7,0,6,0,5,1,4,2,3,2,2,4,1,5,0,14,0],
	  type: 'poly'
 };
 
 // define markeroptions
 var markeroptions = new khtml.maplib.overlay.MarkerOptions(
 	  null, 		//animation
	  null, 		//clickable
	  null, 		//cursor
 	  true, 		//draggable
	  null, 		//flat
	  image, 		//icon
	  map, 			//map
	  null, 		//optimized
	  point, 		//position
	  true, 		//raiseOnDrag
	  shadow, 		//shadow
	  shape, 		//shape
	  "moveable marker", 	//title
	  null, 		//visible
	  null 			//zIndex
 );
 
 // make marker
 var marker = new kthml.maplib.overlay.Marker(markeroptions);
 
 
 the last to sections can be combined:
 
 // make marker with markeroptions
 var marker = new mr.overlay.Marker({
	  draggable: true,
	  raiseOnDrag: true,
	  icon: image,
	  shadow: shadow,
	  shape: shape,
	  map: map,
	  position: point,
	  title: "moveable marker"
 });
 
Parameters:
{number} animation
not used yet, only for compatibility to Google Markers
{bool} clickable
not used yet, only for compatibility to Google Markers
{string} cursor
not used yet, only for compatibility to Google Markers
{bool} draggable
if marker is draggable or not
{bool} flat
not used yet, only for compatibility to Google Markers
{khtml.maplib.overlay.MarkerImage/String/DOM-Element} icon
custom MarkerImage
{khtml.maplib.Map} map
map to place marker onto
optimized
not used yet, only for compatibility to Google Markers
{khtml.maplib.LatLng} position
LatLng where to place marker
{bool} raiseOnDrag
lift marker and shadow from the map and show dragcross
{khtml.maplib.overlay.MarkerImage/String/DOM-Element} shadow
MarkerImage for custom shadow
{Object} shape
shape for custom marker
 var marker_shape = {
		  type: 'circle', 'rect' or 'poly'
		  coord: [x, y, radius] for circle
			 [x1, y1, x2, y2] for rect
			 [x1, y1, x2, y2, x3, y3, ... xn, yn] for poly
		}; 
{string} title
title for mouseover
{bool} visible
not used yet, only for compatibility to Google Markers
{number} zIndex
not used yet, only for compatibility to Google Markers

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Oct 09 2011 20:46:56 GMT+0200 (MESZ)