[mapguide-users] Define map and layer to map in react-layout

H A hadissaalinia at gmail.com
Wed Dec 20 10:07:17 PST 2023


Hi,

Good news! I finally got it worked, adding the lat/lon from the list to the
map and as a separate layer to the legend by using OpenLayers for defining
the vector and source and the following lines:

var layerMgr = viewer.getLayerManager();
 var layerInfo = layerMgr.addLayer(name, vectorLayer);
 viewer.dispatch(parent.MapGuide.Actions.Map.mapLayerAdded(viewer.getMapName(),
layerInfo));

Happy Holidays!



On Fri, Dec 15, 2023 at 7:26 PM Sympatico <pierre.cardinal at sympatico.ca>
wrote:

> Hi,
>
> Did you give a look at
> https://github.com/jumpinjackie/mapguide-react-layout-example ?
>
> Regards
>
> Pierre
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20231220/de5cd00d/attachment.htm>


More information about the mapguide-users mailing list