Git Product home page Git Product logo

jmapviewer's Introduction

JMapViewer with offline support

This is a fork of JMapViewer of OpenStreetMap with support added for offline maps.

Original JMapViewer can be found here: http://wiki.openstreetmap.org/wiki/JMapViewer

Useful for systems that are not connected to the internet.

This code is licensed under GPL.

How to use

You can use the jMapViewer as you would normally do. The difference with the original code base is the addition of the class OfflineOsmTileSource in the package org.openstreetmap.gui.jmapviewer.tilesources.

It requires 3 arguments: the directory where your files are stored, the minimum zoom level that you have stored and the maximum zoom level that you have stored.

Use it like this in Java:

JMapViewer map = new JMapViewer();
map.setTileSource(new OfflineOsmTileSource("file:///Users/paulus/Downloads/jTileDownloader/tiles/",1,9));

Limitations

I hacked this together really really quickly. It is usuable but not for production releases.

Some rough edges:

  • given path is not validated if it exists
  • you are unable to set boundary latitude/longitude of the tiles that you have downloaded so it expects to be able to find tiles for the whole world offline.

How to download the tiles

To download the Open Streetmap tiles to your computer you can use jTileDownloader.

Note that jTileDownloader 0.6 requires Java 7. It will not throw an error when an older JRE is used. As of this writing (August 2, 2012) Apple has not released Java 7 for OS X yet.

jmapviewer's People

Contributors

balloob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jmapviewer's Issues

Limiting latitude and longitude

Is there any way to limit (or specify) the latitude and longitude of the offline tiles I have in JMapViewer? If so, which class should I look into?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.