Hi,
is it possible to change the placement of the navigationbar or the toolbuttons? In Openlayers Standalone a can give them a div. But in drupal i do not find the place for this change. Maybe some of you can help me.
Thanks a lot.

Comments

NewOLUser’s picture

Sorrie, for that issue, you can add an option to every behavior, which gives the div id to the real ol-function: here is the example for the scale line:
That is the original code:

<?php
/**
 * Scale Line Behavior
 */
Drupal.openlayers.addBehavior('openlayers_behavior_scaleline', function (data, options) {
 
Drupal.openlayers.addControl(data.openlayers, 'ScaleLine',);
});
?>

and that the version to change the Place of Scaleline:

<?php
/**
 * Scale Line Behavior
 */
Drupal.openlayers.addBehavior('openlayers_behavior_scaleline', function (data, options) {
   
options.div = OpenLayers.Util.getElement('leftscaleline'); //add this line to change the place of the scalline, "leftscaleline is the id of the div
 
Drupal.openlayers.addControl(data.openlayers, 'ScaleLine',options); //add options
});
?>