[mapguide-users] Fusion API, how to add new vector layer (OpenLayers)

Kenneth, GEOGRAF A/S ks at geograf.dk
Thu Mar 27 05:14:53 EDT 2008


If you use OpenLayers from scratch, you will need a version with 
MapGuide support.
I'm not sure if the 2.5 release has that, but the SVN trunk has.

To add a vector layer you can do:
var map = new OpenLayers.Map(...);
var mgLayer = new OpenLayers.Layer.MapGuide(...);
var vectorLayer = new OpenLayers.Layer.Vector(...);
map.addLayer(mglayer);
map.addLayer(vectorLayer);

You will need to check up on the OpenLayers API for data to put in the 
... places.

The same should work in Fusion, you just have to find the name of the 
map variable.

Regards, Kenneth, GEOGRAF A/S



Бородаев Павел Владимирович skrev:
>
> Hi All.
>
> Is it possible to add new vector layer or other layers to web map 
> using OpenLayers API?
>
> What modifications of source code I should do and where? This will be 
> very useful for me: if it is impossible I will use OpenLayers from 
> scratch.
>
> TIA.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20080327/a36406f6/attachment.html


More information about the mapguide-users mailing list