本文整理汇总了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);
}
}
}
示例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);
}
}
}