• SkylineGlobe 移动端开发测试


    基于SkylineGlobe提供的安卓版本SDK,在已有菜单中增加自定义内容,测试代码如下:

    新增加文件ZhaoHeContainer.java

    package com.skyline.terraexplorer.tools;
    
    import java.util.concurrent.Callable;
    
    import android.widget.Toast;
    
    import com.skyline.teapi.IFeatureLayer;
    import com.skyline.teapi.ISGWorld;
    import com.skyline.terraexplorer.R;
    import com.skyline.terraexplorer.TEApp;
    import com.skyline.terraexplorer.models.MenuEntry;
    import com.skyline.terraexplorer.models.UI;
    
    public class ZhaoHeContainer extends BaseToolWithContainer  {
    	@Override
    	public MenuEntry getMenuEntry() {
    		return MenuEntry.createFor(this, R.string.zhaohe_tool, R.drawable.navigate_plus, 80);
    	}
    	@Override
    	public boolean onBeforeOpenToolContainer() {
    	    toolContainer.setText(String.format("New Tool"));
    		toolContainer.addButton(1, R.drawable.label);
    		toolContainer.addButton(2, R.drawable.add_polyline);
    		toolContainer.addButton(3, R.drawable.add_polygon);
    		toolContainer.addButton(4, R.drawable.list);
    		return true;
    	}
    	@Override
    	public void onButtonClick(int tag) {
    		IFeatureLayer layer = null;
    	    switch (tag) {
            case 1:
            	Toast.makeText(TEApp.getAppContext(), "A button 1", Toast.LENGTH_SHORT).show();
                break;
            case 2:
            	Toast.makeText(TEApp.getAppContext(), "A button 2", Toast.LENGTH_SHORT).show();
                break;
            case 3:
            	Toast.makeText(TEApp.getAppContext(), "A button 3", Toast.LENGTH_SHORT).show();
                break;
            case 4: 
            	Toast.makeText(TEApp.getAppContext(), "A button 4", Toast.LENGTH_SHORT).show();
                break;
    	    }	    
    	}
    }
    

     在ToolManager.java中添加:

    registerTool(new ZhaoHeContainer());
    
  • 相关阅读:
    ssm批量删除
    java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
    springMVC中的日期格式的转化
    常用(二)
    ssm上传文件
    redis命令
    redis的下载与安装(linux版)
    解决Maven项目pom.xml文件报xxx argetclassesMETA-INFMANIFEST.MF (系统找不到指定的路径)问题
    flex布局元素操作详情
    彩色小球的重现以及下雪效果的实现
  • 原文地址:https://www.cnblogs.com/yitianhe/p/5020019.html
Copyright © 2020-2023  润新知