[fusion-dev] Markers in Openlayers.

Alan Boudreault aboudreault at mapgears.com
Mon Jun 9 15:26:30 EDT 2008


I think we'll be able to add a marker layer easily with the Mike's work 
about support for OpenLayers Layer. But maybe this work is only for 
"normal layer" like MapGuide, MapServer, WMS etc.. ? I think Markers are 
very useful so.... i hope to see them in the 1.1.

Alan

Paul Deschamps wrote:
> Hi All,
>
> Want your two cents on the prospect on adding  the 
> "OpenLayers.Layer.Markers" class  into 
> trunk/lib//lib/OpenLayers/OpenLayers.js
>
> Adding a markers layer is quite easy as long as that class is loaded 
> (obviously ;)
>
> Here's a very basic implementation of adding a OL marker in a Fusion app.
>
> function addMarker(iLon,iLat){
>
>     // get the map and map widget
>     var mapWidget = Fusion.getMapById('mapArea');
>     var maps = mapWidget.getAllMaps();
>     var map = maps[0];
>
>     // create a markers layer called "Markers"
>     var markers = new OpenLayers.Layer.Markers( "Markers" );
>
>     // add the marker layer to the OL Map.
>     mapWidget.oMapOL.addLayer(markers);
>
>     // OL Image related stuff.
>     var size = new OpenLayers.Size(10,17);
>     var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
>     var icon = new 
> OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png',size,offset);
>
>     // add the marker.
>     markers.addMarker(new OpenLayers.Marker(new 
> OpenLayers.LonLat(iLon,iLat),icon));
> }
>
> Do we want to add the OpenLayers.Layer.Markers class in 1.1?
>
> Cheers
>
> Paul D.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> fusion-dev mailing list
> fusion-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fusion-dev
>   


-- 
Alan Boudreault
Mapgears
http://www.mapgears.com



More information about the fusion-dev mailing list