[OpenLayers-Users] My own toolbar

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Thu Jan 4 07:45:52 EST 2007


Yes it's possible, I did it for my project as well. I did a lot of
copy/paste, which probably isn't the best you can do ... :-)

I added my GeoservicesMouseToolbar.js to the Controls subdir of OpenLayers,
and rebuild OpenLayers (using the scripts in the build subdir), that's it.

In your javascript code use:

map.addControl(new OpenLayers.Control.GeoservicesMouseToolbar(new
OpenLayers.Pixel(30,-20), 'horizontal'));

Here is the example code (my toolbar basically adds a zoomout button as the
third button, and changes the button hints to Dutch text, as well as using
different images for the buttons).

http://osgis.nl/download/GeoservicesMouseToolbar.js

Hope this helps.

Best regards,
Bart

--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl


--------- Oorspronkelijk bericht --------
Van: Aitor Calero Garcia <aitor.calero at usm.es>
Naar: users at openlayers.org <users at openlayers.org>
Onderwerp: [OpenLayers-Users] My own toolbar
Datum: 04/01/07 10:39

> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Hello all!
> 
> &nbsp;
> 
> I am new to OpenLayers. I&#8217;ve been working with
> GIS WebMaps apps for 5 years, and we have recently found OpenLayers a very
good
> tool. It has everything you need to build an application really easily.
Great
> job!!!
> 
> So, here I&#8217;ve got my first question. I hope in
> the future I could help others too.
> 
> &nbsp;
> 
> We want to create our own toolbar, instead using the
> one that comes with the map, Is it possible, without digging to much in
OL&#8217;s
> javascript code? Thank you, in advance.
> 
> &nbsp;
> 
> Best regards from Spain!!!
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 






More information about the Users mailing list