Autodesk MapGuide Enterprise
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
How to use Fusion API for creating points layer
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
285 Views, 0 Replies
10-18-2012 03:01 PM
How to create points in the client side by input lonlat values? I try use following code:
var mgApiMapWidgetId = 'Map';
var MainFusionWindow = GetFusionWindow();
var pointsLayer = MainFusionWindow.OpenLayers;
var Fusion = MainFusionWindow.Fusion;
var mapWidget = Fusion.getWidgetById(mgApiMapWidgetId);
var map = Fusion.getWidgetById(mgApiMapWidgetId).oMapOL;
alert("a");
pointsLayer.LonLat.fromString("51.2356, -114.235689");
alert("aa");
map.addLayers([pointsLayer]);
alert("aaa");
It can alert to "aa". That means last step not success. Do I need add SRS from the current map? Thank you.
