Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use Fusion API for creating points layer

0 REPLIES 0
Reply
Message 1 of 1
swimming123
559 Views, 0 Replies

How to use Fusion API for creating points layer

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.

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report