User manual
© 2011 Racktivity NV 155/160
Antwerpsesteenweg 19 - 9080 Lochristi - Belgium - www.racktivity.com v 2014.5.14
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
$.template('plugin.googlemaps.content', '<div><div
id="map_canvas" style="width:250px; height:250px"></div></div>');
var result = $.tmpl('plugin.googlemaps.content',
myOptions);
result.appendTo($this);
var map = new
google.maps.Map(document.getElementById("map_canvas"), myOptions);
};
options.addCss({'id': 'googlemaps', 'tag': 'style', 'params': 'html
{ height: 100% }\
body
{ height: 100%; margin: 0px; padding: 0px }\
#map_canvas { height: 100% }'\
})
options.addDependency(cb,
['http://maps.google.com/maps/api/js?sensor=false',
"http://maps.gstatic.com/intl/en_us/mapfiles/api-3/4/2/main.js"]);
};
register(render);
Creating a Macro
1. Create a macro file under /opt/qbase5/www/lfw/js/macros/, for example
macrotest.js.
Note: lfw is the acronym for Lightning Fast Wiki, which is the Incubaid code name
for the [Alkira][] project.
2. Set the metadata for your macro. This information is used in the widget store when
adding a widget to a Dashboard.
o //@metadata wizard: name of the wizard that is launched when selecting the
widget.
o //@metadata description: description of the widget.
o //@metadata image: link to image that is used in the widget store. The images must
be stored in /opt/qbase5/www/lfw/img/macros, the link is relative from
/opt/qbase5/www/lfw/.
o //@metadata documentationUrl: link to the full documentation of the widget on
www.pylabs.org
3. Define the parameters if any. You can set a default value for each parameter. In the
example these parameters are defined with options.params, for example var
longitude = parseFloat(options.params.longitude);. You can provide default
values by adding double pipe characters: var longitude =
parseFloat(options.params.longitude) || 3.83333;










