本文整理汇总了Java中org.openstreetmap.gui.jmapviewer.tilesources.OsmTileSource类的典型用法代码示例。如果您正苦于以下问题:Java OsmTileSource类的具体用法?Java OsmTileSource怎么用?Java OsmTileSource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OsmTileSource类属于org.openstreetmap.gui.jmapviewer.tilesources包,在下文中一共展示了OsmTileSource类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: JMapViewer
import org.openstreetmap.gui.jmapviewer.tilesources.OsmTileSource; //导入依赖的package包/类
/**
* Creates a new {@link JMapViewer} instance.
* @param tileCache The cache where to store tiles
*
*/
public JMapViewer(TileCache tileCache) {
tileSource = new OsmTileSource.Mapnik();
tileController = new TileController(tileSource, tileCache, this);
mapMarkerList = Collections.synchronizedList(new LinkedList<MapMarker>());
mapPolygonList = Collections.synchronizedList(new LinkedList<MapPolygon>());
mapRectangleList = Collections.synchronizedList(new LinkedList<MapRectangle>());
mapMarkersVisible = true;
mapRectanglesVisible = true;
mapPolygonsVisible = true;
tileGridVisible = false;
setLayout(null);
initializeZoomSlider();
setMinimumSize(new Dimension(tileSource.getTileSize(), tileSource.getTileSize()));
setPreferredSize(new Dimension(400, 400));
setDisplayPosition(new Coordinate(50, 9), 3);
}
开发者ID:berniejenny,项目名称:MapAnalyst,代码行数:22,代码来源:JMapViewer.java
示例2: init
import org.openstreetmap.gui.jmapviewer.tilesources.OsmTileSource; //导入依赖的package包/类
private void init() {
setSelectable(false);
setName("OpenStreetMap");
TileSource tileSource = new OsmTileSource.Mapnik();
TileCache cache = new MemoryTileCache(NBR_CACHED_IMAGES);
tileController = new TileController(tileSource, cache, this);
scaleChangeListener = new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
double oldScale = (Double) evt.getOldValue();
double newScale = (Double) evt.getNewValue();
int oldZoom = zoomLevel(oldScale);
int newZoom = zoomLevel(newScale);
if (oldZoom != newZoom) {
tileController.cancelOutstandingJobs();
}
}
};
}
开发者ID:berniejenny,项目名称:MapAnalyst,代码行数:21,代码来源:OpenStreetMap.java
示例3: Registration
import org.openstreetmap.gui.jmapviewer.tilesources.OsmTileSource; //导入依赖的package包/类
public Registration(ModeController controller, MindMap map) {
this.controller = (MindMapController) controller;
mMap = map;
logger = controller.getFrame().getLogger(this.getClass().getName());
mTileSource = new OsmTileSource.Mapnik();
mTileCache = new MemoryTileCache();
mTileController = new TileController(mTileSource, mTileCache, this);
mTileController.setTileLoader(createTileLoader(this));
mOptionContributor = new MapDialogPropertyContributor(this.controller);
synchronized (sTimerSemaphore) {
if (sTimer == null) {
// only once in the system
sTimer = new Timer();
long purgeTime = Resources.getInstance().getLongProperty(
MapDialog.TILE_CACHE_PURGE_TIME,
MapDialog.TILE_CACHE_PURGE_TIME_DEFAULT);
sTimer.schedule(new CachePurger(getCacheDirectory(),
getCacheMaxAge()), purgeTime, purgeTime);
}
}
}
开发者ID:iwabuchiken,项目名称:freemind_1.0.0_20140624_214725,代码行数:24,代码来源:Registration.java
示例4: JMapViewer
import org.openstreetmap.gui.jmapviewer.tilesources.OsmTileSource; //导入依赖的package包/类
public JMapViewer(TileCache tileCache, int downloadThreadCount) {
super();
JobDispatcher.setMaxWorkers(downloadThreadCount);
tileSource = new OsmTileSource.Mapnik();
tileController = new TileController(tileSource, tileCache, this);
mapMarkerList = new LinkedList<>();
mapPolygonList = new LinkedList<>();
mapRectangleList = new LinkedList<>();
mapMarkersVisible = true;
mapRectanglesVisible = true;
mapPolygonsVisible = true;
tileGridVisible = false;
setLayout(null);
initializeZoomSlider();
setMinimumSize(new Dimension(tileSource.getTileSize(), tileSource.getTileSize()));
setPreferredSize(new Dimension(400, 400));
setDisplayPosition(new Coordinate(50, 9), 3);
//setToolTipText("");
}
开发者ID:ne0fhyk,项目名称:3DRServices,代码行数:20,代码来源:JMapViewer.java
示例5: OsmCanvas
import org.openstreetmap.gui.jmapviewer.tilesources.OsmTileSource; //导入依赖的package包/类
public OsmCanvas(List<V> nodes, List<Edge<V>> edges, NodePropertySchema nodeSchema, EdgePropertySchema edgeSchema,
Naming naming) {
super(nodes, edges, nodeSchema, edgeSchema, naming);
tileController = new TileController(new OsmTileSource.Mapnik(), new MemoryTileCache(), this);
lastZoom = -1;
lastTopLeft = null;
lastBottomRight = null;
viewer.addPostRenderPaintable(new PostPaintable());
}
开发者ID:SiLeBAT,项目名称:BfROpenLab,代码行数:11,代码来源:OsmCanvas.java
示例6: Map
import org.openstreetmap.gui.jmapviewer.tilesources.OsmTileSource; //导入依赖的package包/类
public Map() {
map = new JMapViewer();
try {
map.setTileLoader(new OsmFileCacheTileLoader(map));
map.setTileSource(new OsmTileSource.CycleMap());
} catch (SecurityException | IOException e) {
e.printStackTrace();
}
marker = new MapMarkerIcon(new Coordinate(-29, -51));
map.addMapMarker(marker);
guidedMarker = new MapMarkerDot(new Coordinate(0, 0));
guidedMarker.setVisible(false);
map.addMapMarker(guidedMarker);
}
开发者ID:ne0fhyk,项目名称:3DRServices,代码行数:16,代码来源:Map.java
示例7: TileController
import org.openstreetmap.gui.jmapviewer.tilesources.OsmTileSource; //导入依赖的package包/类
public TileController(TileSource source, TileCache tileCache, TileLoaderListener listener) {
tileSource = new OsmTileSource.Mapnik();
tileLoader = new OsmTileLoader(listener);
this.tileCache = tileCache;
jobDispatcher = JobDispatcher.getInstance();
}
开发者ID:ne0fhyk,项目名称:3DRServices,代码行数:7,代码来源:TileController.java
注:本文中的org.openstreetmap.gui.jmapviewer.tilesources.OsmTileSource类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论