Code Monkey home page Code Monkey logo

offlinemap's Introduction

Online Map examples in web browser

Main idea

Modern js map libraries support sync and async tiles loading. You can change this method to own where used some permanent storage. Each tile have unique src so you can use unique id based on same data as src to store tile data. All map scripts, styles and other files (marker images) can be placed to application cache manifest file.

Useful links

Notes

This samples just proof of concept and if you should avoid use this solution if it posible because:

  • cache can eat to many memory and trafic to cache
  • cache of images can't be compressed
  • cache can work slow especially for mobile browsers
  • cache can't be shared between several domains, for each domain you should duplicate cache or use for example iframe with one domain to avoid duplication

If you can use any special application for offline maps as osmand then better use it.

If you can implement any proxy solution on your system for tiles storing then better use it.

Examples

Google Maps with localstorage:

Example and Code. This code can contradict Google Maps/Google Earth APIs Terms of Service par. 10.1.1.

Leaflet with IndexedDB and WebSQL:

Example and Code. MIT License.

You can find more examples with LeafLet and PouchDB there: http://tbicr.github.io/OfflineMap/.

Instead PouchDB also can used localForage, LargeLocalStorage and etc.

Mapbox (Modest Maps) with IndexedDB and WebSQL:

Example and Code. MIT License.

Open Layers with IndexedDB and WebSQL:

Example and Code. MIT License.

offlinemap's People

Watchers

 avatar

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.