zoukankan      html  css  js  c++  java
  • Skyline软件二次开发初级——10如何在WEB页面中的三维地图上控制图层对象

    1.影像图层:

    <html>
        <head>
            <title>Layers 1</title>
            <object id="SGWorld" classid="CLSID:3a4f91b1-65a8-11d5-85c1-0001023952c1" style="visibility:hidden;height:0 "></object>
            <script type="text/javascript" src="abspath.js"></script>
            <script type="text/javascript">
            
            
    function Init()
            {
                
    var imageryLayer = SGWorld.Creator.CreateImageryLayer(toAbspath("data/goldengate.gif"), -122.4765637.82298-122.4631037.81359);
                SGWorld.Navigate.FlyTo(imageryLayer);
            }
            
            
    </script>
        </head>
        <body onload="Init();">
        </body>
    </html>

    2.FLY图层:

    <html>
        <head>
            <title>Layers 2</title>
            <object id="SGWorld" classid="CLSID:3a4f91b1-65a8-11d5-85c1-0001023952c1" style="visibility:hidden;height:0 "></object>
            <script type="text/javascript" src="abspath.js"></script>
            <script type="text/javascript">
            
            
    var popup = null;        
            
            
    function Init()
            {

                SGWorld.Navigate.SetPosition(SGWorld.Creator.CreatePosition(
    -111.9680524.3988515000000,0-48));

                popup 
    = SGWorld.Creator.CreatePopupMessage("Layers sample");
                popup.InnerText 
    = "This sample shows how to create a layer from a fly file.";            
                popup.Align 
    = "TopLeft";
                SGWorld.Window.ShowPopup(popup);

                
    var id = SGWorld.ProjectTree.LoadFlyLayer(toAbspath("data/park.fly"));
                SGWorld.ProjectTree.RenameGroup(id, 
    "Parks");
            }
            
            
            
            
    function Uninit()
            {
                
    if(SGWorld.Project.Name == "")
                    
    return;
                
    if(popup)
                    SGWorld.Window.RemovePopup(popup);

            }
            
            
    </script>
        </head>
        <body onload="Init();" onunload="Uninit()">
        </body>
    </html>
  • 相关阅读:
    服务器实现跨域
    quartz定时任务cron表达式详解
    mysql分区/分片
    微信小程序 之三元运算符代替wx:if 来解决背景图片显示隐藏
    微信小程序 本地缓存保持登录状态之wx.setStorageSync()使用技巧
    微信小程序 赋值问题
    微信小程序 wx.navigateTo()传参及多个参数方法
    js 循环遍历数组
    VUE之Router命令行警告:Named Route 'Home' has a default child route. 解决办法
    VUE之命令行报错:Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead 解决办法
  • 原文地址:https://www.cnblogs.com/yitianhe/p/2699687.html
Copyright © 2011-2022 走看看