mirror of
https://github.com/Esri/offline-editor-js.git
synced 2026-02-07 14:26:22 +00:00
commit
dfca36f767
14
README.md
14
README.md
@ -11,7 +11,8 @@ This repo contains the following libraries:
|
||||
* `offlineFeaturesManager` - Extends and overrides a feature layer.
|
||||
* `editsStore` - Provides static helper methods for working with the offline data store.
|
||||
- `/tiles`: stores portions of tiled maps client-side and uses the cached tiles when device is offline
|
||||
* `offlineTilesEnabler` Extends and overrides a tiled map service.
|
||||
* `offlineTilesEnabler` Extends and overrides a tiled map service from ArcGIS Online or for partial offline use.
|
||||
* `OfflineTilesEnablerLayer` Extends any Esri tiled basemap service for a web app that has a requirement for browser reload and/or restart. This library should be used in conjunction with an application cache coding pattern.
|
||||
- `/tpk`: lets you work with TPK files.
|
||||
* `TPKLayer` - parses a TPK file and displays it as a tiled map layer.
|
||||
- `/utils`: contains various helper libraries.
|
||||
@ -48,7 +49,7 @@ Extends and overrides a tiled map service. Provides the ability to customize the
|
||||
|
||||
##TPKLayer
|
||||
|
||||
Extends TileMapServiceLayer. You can display TPK files with this library.
|
||||
Extends TileMapServiceLayer. You can display TPK files with this library. TPK's are binary tile package files. Go [here](http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000017w000000) for more information on how to create a TPK file.
|
||||
|
||||
* __Click [here](doc/tpklayer.md) to see the full API doc for `TPKLayer`__
|
||||
|
||||
@ -81,19 +82,20 @@ Extends TileMapServiceLayer. You can display TPK files with this library.
|
||||
##Dependencies
|
||||
|
||||
* ArcGIS API for JavaScript (v3.8+)
|
||||
* NOTE: browser limitations and technical dependencies. The offline capabilities in this toolkit depend on psuedo-persistent HTML5 capabilities being present in the browser. Go [here](doc/dependencies.md) for a detailed breakdown of the information.
|
||||
* NOTE: browser limitations and technical dependencies. The offline capabilities in this toolkit depend on certain HTML5 capabilities being present in the browser. Go [here](doc/dependencies.md) for a detailed breakdown of the information.
|
||||
* We offer browser support for Chrome and Safari only, at this time. Some of the capabilities in the repository will not work on Internet Explorer. We continue to evaluate IE's capabilities as new releases become available to try and identify a point where we might be able to support it.
|
||||
|
||||
* Sub-modules (see `/vendor` directory)
|
||||
|
||||
* [offline.js](https://github.com/hubspot/offline) - it allows detection of the online/offline condition and provides events to hook callbacks on when this condition changes
|
||||
* [IndexedDBShim](https://github.com/axemclion/IndexedDBShim) - polyfill to simulate indexed db functionality in browsers/platforms where it is not supported (notably iOS Safari, PhoneGap, Android Chrome)
|
||||
- IMPORTANT: There is a know [issue](https://github.com/axemclion/IndexedDBShim/issues/115) with IndexedDBShim on Safari. The workaround is to switch from using /dist/IndexedDBShim.min.js to just using IndexedDBShim.js and then modify line #1467 to a more appropriate size that will meet all your storage needs, for example: ```var DEFAULT_DB_SIZE = 24 * 1024 * 1024```
|
||||
* [IndexedDBShim](https://github.com/axemclion/IndexedDBShim) - polyfill to simulate indexeddb, or access WebSQL functionality in browsers/platforms where it is not supported (notably desktop Safari and iOS Safari)
|
||||
- IMPORTANT: There is a know [issue](https://github.com/axemclion/IndexedDBShim/issues/115) with IndexedDBShim on Safari. The workaround is to switch from using /dist/IndexedDBShim.min.js to just using IndexedDBShim.js and then search for and modify the line that defines the value for `DEFAULT_DB_SIZE`. Set this to more appropriate size that will meet all your storage needs, for example: ```var DEFAULT_DB_SIZE = 24 * 1024 * 1024```
|
||||
* [jasmine.async](https://github.com/derickbailey/jasmine.async.git) - library to help implementing tests of async functionality (used in tests)
|
||||
|
||||
* Non sub-module based libraries
|
||||
* [FileSaver.js](https://github.com/Esri/offline-editor-js/blob/master/lib/tiles/README.md) - library to assist with uploading and downloading of files containing tile information.
|
||||
* [grunt-manifest](https://github.com/gunta/grunt-manifest) node.js library to assist with the creation of manifest files.
|
||||
* [zip](http://gildas-lormeau.github.io/zip.js/) A library for zipping and unzipping files.
|
||||
* [zip](http://gildas-lormeau.github.io/zip.js/) A library for zipping and unzipping files.
|
||||
* [xml2json](https://code.google.com/p/x2js/) A library for converting XML to JSON. Seems to handle complex XML.
|
||||
|
||||
## Resources
|
||||
|
||||
76
index.html
Normal file
76
index.html
Normal file
@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Offline Editing and Mapping with the ArcGIS API for JavaScript</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<style>
|
||||
body {
|
||||
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||||
}
|
||||
h1 {
|
||||
background-color: #0078c5;
|
||||
color: white;
|
||||
padding: 1em;
|
||||
margin-bottom:1em;
|
||||
border-radius: 10px;
|
||||
}
|
||||
pre code {
|
||||
padding: 10px 15px;
|
||||
border: 1px solid #ccc;
|
||||
background: white;
|
||||
color: #444;
|
||||
/* margin: 1em 0 0;*/
|
||||
font-size: 12px;
|
||||
font-family: "Consolas", "Menlo", "Lucida Console", "Courier New", monospace;
|
||||
box-shadow: 0 0 15px #ddd;
|
||||
-moz-box-shadow: 0 0 15px #ddd;
|
||||
-webkit-box-shadow: 0 0 15px #ddd;
|
||||
|
||||
display: block;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.banner {
|
||||
background-color: #0078c5;
|
||||
color: white;
|
||||
padding: 1em;
|
||||
margin-bottom:1em;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
<a href="https://github.com/Esri/offline-editor-js"><img style="position: absolute; top: 0; right: 0; border: 0;"
|
||||
src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" alt="Fork me on GitHub"></a>
|
||||
<h1 class="title">ArcGIS Offline Library for JavaScript</h1>
|
||||
<p>This repo contains a set of libraries for using the ArcGIS API for JavaScript offline. You can now edit and map while offline. It's still a work-in-progress
|
||||
so if you have suggestions open an issue or if you want to make a pull request we welcome your proposed modifications.</p>
|
||||
<p>This repo contains two libraries: </p>
|
||||
<ul>
|
||||
<li><b>/edit</b>: handles vector features and stores adds, updates and deletes while offline. Resync's edits with server once connection is reestablished</li>
|
||||
<ul>
|
||||
<li><b>offlineFeaturesManager</b> - Extends and overrides a feature layer. </li>
|
||||
<li><b>editsStore</b> - Provides static helper methods for working with the offline data store.</li>
|
||||
</ul>
|
||||
<li><b>/tiles</b>: stores portions of tiled maps client-side and uses the cached tiles when device is offline</li>
|
||||
<ul>
|
||||
<li><b>offlineTilesEnabler</b> - Extends and overrides a tiled map service.</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<h3>Why edit offline with JavaScript?</h3>
|
||||
<p>Many "in the field" use cases for mapping apps require that workers go into areas with limited, intermittent or no cellular network connectivity.
|
||||
Using this library will allow you to re-use your JavaScript skills for building web applications that work in these use cases.</p>
|
||||
<h3>What types of features will it work with?</h3>
|
||||
<p>The library currently works with esri.geometry.Geometry.Point, Polygon and Polyline.</p>
|
||||
|
||||
|
||||
|
||||
<!--<pre><code>-->
|
||||
<!--//Instantiate the OfflineStore library and pass it a reference to the map.-->
|
||||
<!--offlineStore = new OfflineStore(map);-->
|
||||
<!--</code></pre>-->
|
||||
|
||||
<br>
|
||||
</html>
|
||||
BIN
tiny-image.png
Normal file
BIN
tiny-image.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Loading…
x
Reference in New Issue
Block a user