当前位置: 首页>>代码示例>>Java>>正文


Java MapFrame.setGridXDelt方法代码示例

本文整理汇总了Java中org.meteoinfo.legend.MapFrame.setGridXDelt方法的典型用法代码示例。如果您正苦于以下问题:Java MapFrame.setGridXDelt方法的具体用法?Java MapFrame.setGridXDelt怎么用?Java MapFrame.setGridXDelt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.meteoinfo.legend.MapFrame的用法示例。


在下文中一共展示了MapFrame.setGridXDelt方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MeteoInfoScript

import org.meteoinfo.legend.MapFrame; //导入方法依赖的package包/类
/**
 * Constructor
 * @param path Start up path
 */
public MeteoInfoScript(String path) {
    this.startUpPath = path;
    this.batchMode = true;
    this.mapLayout = new MapLayout();        
    this.chartPanel = new ChartPanel(null);
    dataInfoList = new ArrayList<MeteoDataInfo>();
    drawType2D = DrawType2D.Contour;
    this.plotDimension = PlotDimension.Lat_Lon;
    this.isMap = true;
    
    //Add default map layer
    //String fn = path + File.separator + "map" + File.separator + "country1.shp";
    String fn = "D:/Temp/map/country1.shp";
    if (new File(fn).exists()){
        try {
            MapLayer layer = MapDataManage.loadLayer(fn);
            PolygonBreak pgb = (PolygonBreak)layer.getLegendScheme().getLegendBreaks().get(0);
            pgb.setDrawFill(false);                
            MapFrame mapFrame = mapLayout.getActiveMapFrame();
            MapView mapView = mapFrame.getMapView();
            mapView.setLockViewUpdate(true);
            mapFrame.addLayer(layer);
            mapFrame.setGridXDelt(60);
            mapFrame.setGridYDelt(30);
            mapLayout.getActiveLayoutMap().zoomToExtentLonLatEx(mapView.getLayersWholeExtent());
            mapView.setLockViewUpdate(false);
        } catch (Exception ex) {
            Logger.getLogger(MeteoInfoScript.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
 
开发者ID:meteoinfo,项目名称:MeteoInfoLib,代码行数:36,代码来源:MeteoInfoScript.java

示例2: MeteoInfoMap

import org.meteoinfo.legend.MapFrame; //导入方法依赖的package包/类
/**
 * Constructor
 *
 * @param path Start up path
 */
public MeteoInfoMap(String path) {
    this.startUpPath = path;
    this.batchMode = true;
    this.mapLayout = new MapLayout();
    drawType2D = DrawType2D.Contour;

    //Add default map layer
    //String fn = path + File.separator + "map" + File.separator + "country1.shp";
    String fn = "D:/Temp/map/country1.shp";
    if (new File(fn).exists()) {
        try {
            MapLayer layer = MapDataManage.loadLayer(fn);
            PolygonBreak pgb = (PolygonBreak) layer.getLegendScheme().getLegendBreaks().get(0);
            pgb.setDrawFill(false);
            MapFrame mapFrame = mapLayout.getActiveMapFrame();
            MapView mapView = mapFrame.getMapView();
            mapView.setLockViewUpdate(true);
            mapFrame.addLayer(layer);
            mapFrame.setGridXDelt(60);
            mapFrame.setGridYDelt(30);
            mapLayout.getActiveLayoutMap().zoomToExtentLonLatEx(mapView.getLayersWholeExtent());
            mapView.setLockViewUpdate(false);
        } catch (Exception ex) {
            Logger.getLogger(MeteoInfoMap.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
 
开发者ID:meteoinfo,项目名称:MeteoInfoLib,代码行数:33,代码来源:MeteoInfoMap.java


注:本文中的org.meteoinfo.legend.MapFrame.setGridXDelt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。