├── README ├── dbf.html ├── index.html ├── lib ├── OpenLayers │ ├── OpenLayers.js │ ├── img │ │ ├── blank.gif │ │ ├── cloud-popup-relative.png │ │ ├── drag-rectangle-off.png │ │ ├── drag-rectangle-on.png │ │ ├── east-mini.png │ │ ├── layer-switcher-maximize.png │ │ ├── layer-switcher-minimize.png │ │ ├── marker-blue.png │ │ ├── marker-gold.png │ │ ├── marker-green.png │ │ ├── marker.png │ │ ├── measuring-stick-off.png │ │ ├── measuring-stick-on.png │ │ ├── north-mini.png │ │ ├── panning-hand-off.png │ │ ├── panning-hand-on.png │ │ ├── slider.png │ │ ├── south-mini.png │ │ ├── west-mini.png │ │ ├── zoom-minus-mini.png │ │ ├── zoom-plus-mini.png │ │ ├── zoom-world-mini.png │ │ └── zoombar.png │ └── theme │ │ └── default │ │ ├── framedCloud.css │ │ ├── google.css │ │ ├── google.tidy.css │ │ ├── ie6-style.css │ │ ├── ie6-style.tidy.css │ │ ├── img │ │ ├── add_point_off.png │ │ ├── add_point_on.png │ │ ├── blank.gif │ │ ├── close.gif │ │ ├── drag-rectangle-off.png │ │ ├── drag-rectangle-on.png │ │ ├── draw_line_off.png │ │ ├── draw_line_on.png │ │ ├── draw_point_off.png │ │ ├── draw_point_on.png │ │ ├── draw_polygon_off.png │ │ ├── draw_polygon_on.png │ │ ├── editing_tool_bar.png │ │ ├── move_feature_off.png │ │ ├── move_feature_on.png │ │ ├── navigation_history.png │ │ ├── overview_replacement.gif │ │ ├── pan-panel-NOALPHA.png │ │ ├── pan-panel.png │ │ ├── pan_off.png │ │ ├── pan_on.png │ │ ├── panning-hand-off.png │ │ ├── panning-hand-on.png │ │ ├── remove_point_off.png │ │ ├── remove_point_on.png │ │ ├── ruler.png │ │ ├── save_features_off.png │ │ ├── save_features_on.png │ │ ├── view_next_off.png │ │ ├── view_next_on.png │ │ ├── view_previous_off.png │ │ ├── view_previous_on.png │ │ ├── zoom-panel-NOALPHA.png │ │ └── zoom-panel.png │ │ ├── style.css │ │ └── style.tidy.css ├── binaryajax.js └── excanvas.js ├── naturalearthdata.html ├── naturalearthdata ├── 110m-cultural.zip ├── 110m-physical.zip ├── NEV-Logo-Black_sm.png ├── README ├── cultural │ ├── 110m-admin-0-boundary-lines.dbf │ ├── 110m-admin-0-boundary-lines.prj │ ├── 110m-admin-0-boundary-lines.shp │ ├── 110m-admin-0-boundary-lines.shx │ ├── 110m-admin-0-countries.dbf │ ├── 110m-admin-0-countries.prj │ ├── 110m-admin-0-countries.shp │ ├── 110m-admin-0-countries.shx │ ├── 110m-admin-0-pacific-groupings.dbf │ ├── 110m-admin-0-pacific-groupings.prj │ ├── 110m-admin-0-pacific-groupings.shp │ ├── 110m-admin-0-pacific-groupings.shx │ ├── 110m-admin-0-tiny-countries.dbf │ ├── 110m-admin-0-tiny-countries.prj │ ├── 110m-admin-0-tiny-countries.shp │ ├── 110m-admin-0-tiny-countries.shx │ ├── 110m-admin-1-states-provinces-lines-shp.dbf │ ├── 110m-admin-1-states-provinces-lines-shp.prj │ ├── 110m-admin-1-states-provinces-lines-shp.shp │ ├── 110m-admin-1-states-provinces-lines-shp.shx │ ├── 110m-admin-1-states-provinces-poly-shp.dbf │ ├── 110m-admin-1-states-provinces-poly-shp.prj │ ├── 110m-admin-1-states-provinces-poly-shp.shp │ ├── 110m-admin-1-states-provinces-poly-shp.shx │ ├── 110m-populated-places.dbf │ ├── 110m-populated-places.prj │ ├── 110m-populated-places.sbn │ ├── 110m-populated-places.sbx │ ├── 110m-populated-places.shp │ └── 110m-populated-places.shx └── physical │ ├── 110m-coastline.dbf │ ├── 110m-coastline.prj │ ├── 110m-coastline.shp │ ├── 110m-coastline.shx │ ├── 110m-geography-marine-polys.dbf │ ├── 110m-geography-marine-polys.prj │ ├── 110m-geography-marine-polys.sbn │ ├── 110m-geography-marine-polys.sbx │ ├── 110m-geography-marine-polys.shp │ ├── 110m-geography-marine-polys.shx │ ├── 110m-geography-regions-points.dbf │ ├── 110m-geography-regions-points.prj │ ├── 110m-geography-regions-points.sbn │ ├── 110m-geography-regions-points.sbx │ ├── 110m-geography-regions-points.shp │ ├── 110m-geography-regions-points.shx │ ├── 110m-geography-regions-polys.dbf │ ├── 110m-geography-regions-polys.prj │ ├── 110m-geography-regions-polys.sbn │ ├── 110m-geography-regions-polys.sbx │ ├── 110m-geography-regions-polys.shp │ ├── 110m-geography-regions-polys.shx │ ├── 110m-glaciated-areas.dbf │ ├── 110m-glaciated-areas.prj │ ├── 110m-glaciated-areas.shp │ ├── 110m-glaciated-areas.shx │ ├── 110m-graticules-all │ ├── 110m-graticules-1.dbf │ ├── 110m-graticules-1.prj │ ├── 110m-graticules-1.shp │ ├── 110m-graticules-1.shx │ ├── 110m-graticules-10.dbf │ ├── 110m-graticules-10.prj │ ├── 110m-graticules-10.shp │ ├── 110m-graticules-10.shx │ ├── 110m-graticules-15.dbf │ ├── 110m-graticules-15.prj │ ├── 110m-graticules-15.shp │ ├── 110m-graticules-15.shx │ ├── 110m-graticules-20.dbf │ ├── 110m-graticules-20.prj │ ├── 110m-graticules-20.shp │ ├── 110m-graticules-20.shx │ ├── 110m-graticules-30.dbf │ ├── 110m-graticules-30.prj │ ├── 110m-graticules-30.shp │ ├── 110m-graticules-30.shx │ ├── 110m-graticules-5.dbf │ ├── 110m-graticules-5.prj │ ├── 110m-graticules-5.shp │ ├── 110m-graticules-5.shx │ ├── 110m-wgs84-bounding-box.dbf │ ├── 110m-wgs84-bounding-box.prj │ ├── 110m-wgs84-bounding-box.sbn │ ├── 110m-wgs84-bounding-box.sbx │ ├── 110m-wgs84-bounding-box.shp │ ├── 110m-wgs84-bounding-box.shp.xml │ └── 110m-wgs84-bounding-box.shx │ ├── 110m-lakes.dbf │ ├── 110m-lakes.prj │ ├── 110m-lakes.shp │ ├── 110m-lakes.shx │ ├── 110m-land.dbf │ ├── 110m-land.prj │ ├── 110m-land.shp │ ├── 110m-land.shx │ ├── 110m-ocean.dbf │ ├── 110m-ocean.prj │ ├── 110m-ocean.shp │ ├── 110m-ocean.shx │ ├── 110m-physical-geographic-lines.dbf │ ├── 110m-physical-geographic-lines.prj │ ├── 110m-physical-geographic-lines.shp │ ├── 110m-physical-geographic-lines.shx │ ├── 110m-rivers-lake-centerlines.dbf │ ├── 110m-rivers-lake-centerlines.prj │ ├── 110m-rivers-lake-centerlines.shp │ └── 110m-rivers-lake-centerlines.shx ├── ol_simple.html ├── ol_simple.js ├── shp.html ├── simple.html ├── src ├── binarywrapper.js ├── dbf.js ├── layer.js ├── map.js ├── ol_shapefile.js └── shapefile.js └── thematicmapping ├── Readme.txt ├── TM_WORLD_BORDERS_SIMPL-0.3.dbf ├── TM_WORLD_BORDERS_SIMPL-0.3.prj ├── TM_WORLD_BORDERS_SIMPL-0.3.shp └── TM_WORLD_BORDERS_SIMPL-0.3.shx /README: -------------------------------------------------------------------------------- 1 | A binary shapefile loader and canvas-based renderer, for javascript. Many caveats: 2 | 3 | Seems best in Safari... times out in IE and in Firefox 3.5 with large files. 4 | Does the dumbest thing possible and reads entire shp and dbf files in one go. 5 | Error checking is strange (needs testing with more known-good files). 6 | Implies that it's a good idea to load large binary files over the network. 7 | Only supports a small subset of shapes. 8 | Is almost entirely negligent of the format specifications. 9 | Doesn't do anything much apart from proof of concept. 10 | 11 | http://www.nihilogic.dk/labs/binaryajax/binaryajax.js is used for loading binary data via XMLHttpRequest 12 | http://code.google.com/p/vanrijkom-flashlibs/ was ported to js from actionscript 13 | http://code.google.com/p/explorercanvas/ is used for IE support 14 | 15 | dbf.js and shapefile.js are close relatives of the vanrijkom-libs code and as such are LGPL v2 as well 16 | binarywrapper.js is new, to support parsing doubles and to keep track of binary offsets and endianness 17 | 18 | excanvas.js is under Apache License 2.0 19 | binaryajax.js is under MPL 20 | 21 | world borders shapefile is from http://thematicmapping.org/downloads/world_borders.php licensed CC-BY-SA 3.0 22 | 23 | -------------------------------------------------------------------------------- /dbf.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Javascript DBF Loader 4 | 5 | 6 | 7 | 35 | 36 | 37 | 38 |

Javascript DBF Loader

39 |

Loading dbf... uninformative errors may appear in the dark crevices of your browser.

40 |

See http://github.com/RandomEtc/shapefile-js for more details.

41 | 42 | 43 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Javascript Shapefile and DBF Loader 4 | 5 | 6 | 7 | 8 | 9 | 151 | 163 | 164 | 165 |

Javascript Shapefile and DBF Loader

166 |

Loading shapefile... uninformative errors may appear in the dark crevices of your browser.

167 | 168 |

See http://github.com/RandomEtc/shapefile-js for more details.

169 | 170 | 171 | -------------------------------------------------------------------------------- /lib/OpenLayers/img/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/blank.gif -------------------------------------------------------------------------------- /lib/OpenLayers/img/cloud-popup-relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/cloud-popup-relative.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/drag-rectangle-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/drag-rectangle-off.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/drag-rectangle-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/drag-rectangle-on.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/east-mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/east-mini.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/layer-switcher-maximize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/layer-switcher-maximize.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/layer-switcher-minimize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/layer-switcher-minimize.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/marker-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/marker-blue.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/marker-gold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/marker-gold.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/marker-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/marker-green.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/marker.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/measuring-stick-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/measuring-stick-off.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/measuring-stick-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/measuring-stick-on.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/north-mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/north-mini.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/panning-hand-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/panning-hand-off.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/panning-hand-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/panning-hand-on.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/slider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/slider.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/south-mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/south-mini.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/west-mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/west-mini.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/zoom-minus-mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/zoom-minus-mini.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/zoom-plus-mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/zoom-plus-mini.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/zoom-world-mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/zoom-world-mini.png -------------------------------------------------------------------------------- /lib/OpenLayers/img/zoombar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/img/zoombar.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/framedCloud.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/framedCloud.css -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/google.css: -------------------------------------------------------------------------------- 1 | .olLayerGoogleCopyright { 2 | right: 3px; 3 | bottom: 2px; 4 | left: auto; 5 | } 6 | .olLayerGoogleV3.olLayerGoogleCopyright { 7 | bottom: 0px; 8 | right: 0px !important; 9 | } 10 | .olLayerGooglePoweredBy { 11 | left: 2px; 12 | bottom: 2px; 13 | } 14 | .olLayerGoogleV3.olLayerGooglePoweredBy { 15 | bottom: 0px !important; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/google.tidy.css: -------------------------------------------------------------------------------- 1 | .olLayerGoogleCopyright{right:3px;bottom:2px;left:auto;}.olLayerGoogleV3.olLayerGoogleCopyright{bottom:0;right:0!important;}.olLayerGooglePoweredBy{left:2px;bottom:2px;}.olLayerGoogleV3.olLayerGooglePoweredBy{bottom:0!important;} -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/ie6-style.css: -------------------------------------------------------------------------------- 1 | .olControlZoomPanel div { 2 | background-image: url(img/zoom-panel-NOALPHA.png); 3 | } 4 | .olControlPanPanel div { 5 | background-image: url(img/pan-panel-NOALPHA.png); 6 | } 7 | .olControlEditingToolbar { 8 | width: 200px; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/ie6-style.tidy.css: -------------------------------------------------------------------------------- 1 | .olControlZoomPanel div{background-image:url(img/zoom-panel-NOALPHA.png);}.olControlPanPanel div{background-image:url(img/pan-panel-NOALPHA.png);}.olControlEditingToolbar{width:200px;} -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/add_point_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/add_point_off.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/add_point_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/add_point_on.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/blank.gif -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/close.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/close.gif -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/drag-rectangle-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/drag-rectangle-off.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/drag-rectangle-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/drag-rectangle-on.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/draw_line_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/draw_line_off.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/draw_line_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/draw_line_on.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/draw_point_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/draw_point_off.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/draw_point_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/draw_point_on.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/draw_polygon_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/draw_polygon_off.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/draw_polygon_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/draw_polygon_on.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/editing_tool_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/editing_tool_bar.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/move_feature_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/move_feature_off.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/move_feature_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/move_feature_on.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/navigation_history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/navigation_history.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/overview_replacement.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/overview_replacement.gif -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/pan-panel-NOALPHA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/pan-panel-NOALPHA.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/pan-panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/pan-panel.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/pan_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/pan_off.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/pan_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/pan_on.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/panning-hand-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/panning-hand-off.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/panning-hand-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/panning-hand-on.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/remove_point_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/remove_point_off.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/remove_point_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/remove_point_on.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/ruler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/ruler.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/save_features_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/save_features_off.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/save_features_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/save_features_on.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/view_next_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/view_next_off.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/view_next_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/view_next_on.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/view_previous_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/view_previous_off.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/view_previous_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/view_previous_on.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/zoom-panel-NOALPHA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/zoom-panel-NOALPHA.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/img/zoom-panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/lib/OpenLayers/theme/default/img/zoom-panel.png -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/style.css: -------------------------------------------------------------------------------- 1 | div.olMap { 2 | z-index: 0; 3 | padding: 0 !important; 4 | margin: 0 !important; 5 | cursor: default; 6 | } 7 | 8 | div.olMapViewport { 9 | text-align: left; 10 | } 11 | 12 | div.olLayerDiv { 13 | -moz-user-select: none; 14 | -khtml-user-select: none; 15 | } 16 | 17 | .olLayerGoogleCopyright { 18 | left: 2px; 19 | bottom: 2px; 20 | } 21 | .olLayerGoogleV3.olLayerGoogleCopyright { 22 | right: auto !important; 23 | } 24 | .olLayerGooglePoweredBy { 25 | left: 2px; 26 | bottom: 15px; 27 | } 28 | .olLayerGoogleV3.olLayerGooglePoweredBy { 29 | bottom: 15px !important; 30 | } 31 | .olControlAttribution { 32 | font-size: smaller; 33 | right: 3px; 34 | bottom: 4.5em; 35 | position: absolute; 36 | display: block; 37 | } 38 | .olControlScale { 39 | right: 3px; 40 | bottom: 3em; 41 | display: block; 42 | position: absolute; 43 | font-size: smaller; 44 | } 45 | .olControlScaleLine { 46 | display: block; 47 | position: absolute; 48 | left: 10px; 49 | bottom: 15px; 50 | font-size: xx-small; 51 | } 52 | .olControlScaleLineBottom { 53 | border: solid 2px black; 54 | border-bottom: none; 55 | margin-top:-2px; 56 | text-align: center; 57 | } 58 | .olControlScaleLineTop { 59 | border: solid 2px black; 60 | border-top: none; 61 | text-align: center; 62 | } 63 | 64 | .olControlPermalink { 65 | right: 3px; 66 | bottom: 1.5em; 67 | display: block; 68 | position: absolute; 69 | font-size: smaller; 70 | } 71 | 72 | div.olControlMousePosition { 73 | bottom: 0em; 74 | right: 3px; 75 | display: block; 76 | position: absolute; 77 | font-family: Arial; 78 | font-size: smaller; 79 | } 80 | 81 | .olControlOverviewMapContainer { 82 | position: absolute; 83 | bottom: 0; 84 | right: 0; 85 | } 86 | 87 | .olControlOverviewMapElement { 88 | padding: 10px 18px 10px 10px; 89 | background-color: #00008B; 90 | -moz-border-radius: 1em 0 0 0; 91 | } 92 | 93 | .olControlOverviewMapMinimizeButton { 94 | right: 0; 95 | bottom: 80px; 96 | cursor: pointer; 97 | } 98 | 99 | .olControlOverviewMapMaximizeButton { 100 | right: 0; 101 | bottom: 80px; 102 | cursor: pointer; 103 | } 104 | 105 | .olControlOverviewMapExtentRectangle { 106 | overflow: hidden; 107 | background-image: url("img/blank.gif"); 108 | cursor: move; 109 | border: 2px dotted red; 110 | } 111 | .olControlOverviewMapRectReplacement { 112 | overflow: hidden; 113 | cursor: move; 114 | background-image: url("img/overview_replacement.gif"); 115 | background-repeat: no-repeat; 116 | background-position: center; 117 | } 118 | 119 | .olLayerGeoRSSDescription { 120 | float:left; 121 | width:100%; 122 | overflow:auto; 123 | font-size:1.0em; 124 | } 125 | .olLayerGeoRSSClose { 126 | float:right; 127 | color:gray; 128 | font-size:1.2em; 129 | margin-right:6px; 130 | font-family:sans-serif; 131 | } 132 | .olLayerGeoRSSTitle { 133 | float:left;font-size:1.2em; 134 | } 135 | 136 | .olPopupContent { 137 | padding:5px; 138 | overflow: auto; 139 | } 140 | 141 | .olControlNavigationHistory { 142 | background-image: url("img/navigation_history.png"); 143 | background-repeat: no-repeat; 144 | width: 24px; 145 | height: 24px; 146 | 147 | } 148 | .olControlNavigationHistoryPreviousItemActive { 149 | background-position: 0 0; 150 | } 151 | .olControlNavigationHistoryPreviousItemInactive { 152 | background-position: 0 -24px; 153 | } 154 | .olControlNavigationHistoryNextItemActive { 155 | background-position: -24px 0; 156 | } 157 | .olControlNavigationHistoryNextItemInactive { 158 | background-position: -24px -24px; 159 | } 160 | 161 | div.olControlSaveFeaturesItemActive { 162 | background-image: url(img/save_features_on.png); 163 | background-repeat: no-repeat; 164 | background-position: 0 1px; 165 | } 166 | div.olControlSaveFeaturesItemInactive { 167 | background-image: url(img/save_features_off.png); 168 | background-repeat: no-repeat; 169 | background-position: 0 1px; 170 | } 171 | 172 | .olHandlerBoxZoomBox { 173 | border: 2px solid red; 174 | position: absolute; 175 | background-color: white; 176 | opacity: 0.50; 177 | font-size: 1px; 178 | filter: alpha(opacity=50); 179 | } 180 | .olHandlerBoxSelectFeature { 181 | border: 2px solid blue; 182 | position: absolute; 183 | background-color: white; 184 | opacity: 0.50; 185 | font-size: 1px; 186 | filter: alpha(opacity=50); 187 | } 188 | 189 | .olControlPanPanel { 190 | top: 10px; 191 | left: 5px; 192 | } 193 | 194 | .olControlPanPanel div { 195 | background-image: url(img/pan-panel.png); 196 | height: 18px; 197 | width: 18px; 198 | cursor: pointer; 199 | position: absolute; 200 | } 201 | 202 | .olControlPanPanel .olControlPanNorthItemInactive { 203 | top: 0; 204 | left: 9px; 205 | background-position: 0 0; 206 | } 207 | .olControlPanPanel .olControlPanSouthItemInactive { 208 | top: 36px; 209 | left: 9px; 210 | background-position: 18px 0; 211 | } 212 | .olControlPanPanel .olControlPanWestItemInactive { 213 | position: absolute; 214 | top: 18px; 215 | left: 0; 216 | background-position: 0 18px; 217 | } 218 | .olControlPanPanel .olControlPanEastItemInactive { 219 | top: 18px; 220 | left: 18px; 221 | background-position: 18px 18px; 222 | } 223 | 224 | .olControlZoomPanel { 225 | top: 71px; 226 | left: 14px; 227 | } 228 | 229 | .olControlZoomPanel div { 230 | background-image: url(img/zoom-panel.png); 231 | position: absolute; 232 | height: 18px; 233 | width: 18px; 234 | cursor: pointer; 235 | } 236 | 237 | .olControlZoomPanel .olControlZoomInItemInactive { 238 | top: 0; 239 | left: 0; 240 | background-position: 0 0; 241 | } 242 | 243 | .olControlZoomPanel .olControlZoomToMaxExtentItemInactive { 244 | top: 18px; 245 | left: 0; 246 | background-position: 0 -18px; 247 | } 248 | 249 | .olControlZoomPanel .olControlZoomOutItemInactive { 250 | top: 36px; 251 | left: 0; 252 | background-position: 0 18px; 253 | } 254 | 255 | /* 256 | * When a potential text is bigger than the image it move the image 257 | * with some headers (closes #3154) 258 | */ 259 | .olControlPanZoomBar div { 260 | font-size: 1px; 261 | } 262 | 263 | .olPopupCloseBox { 264 | background: url("img/close.gif") no-repeat; 265 | cursor: pointer; 266 | } 267 | 268 | .olFramedCloudPopupContent { 269 | padding: 5px; 270 | overflow: auto; 271 | } 272 | 273 | .olControlNoSelect { 274 | -moz-user-select: none; 275 | -khtml-user-select: none; 276 | } 277 | 278 | .olImageLoadError { 279 | background-color: pink; 280 | opacity: 0.5; 281 | filter: alpha(opacity=50); /* IE */ 282 | } 283 | 284 | /** 285 | * Cursor styles 286 | */ 287 | 288 | .olCursorWait { 289 | cursor: wait; 290 | } 291 | .olDragDown { 292 | cursor: move; 293 | } 294 | .olDrawBox { 295 | cursor: crosshair; 296 | } 297 | .olControlDragFeatureOver { 298 | cursor: move; 299 | } 300 | .olControlDragFeatureActive.olControlDragFeatureOver.olDragDown { 301 | cursor: -moz-grabbing; 302 | } 303 | 304 | /** 305 | * Layer switcher 306 | */ 307 | .olControlLayerSwitcher { 308 | position: absolute; 309 | top: 25px; 310 | right: 0; 311 | width: 20em; 312 | font-family: sans-serif; 313 | font-weight: bold; 314 | margin-top: 3px; 315 | margin-left: 3px; 316 | margin-bottom: 3px; 317 | font-size: smaller; 318 | color: white; 319 | background-color: transparent; 320 | } 321 | 322 | .olControlLayerSwitcher .layersDiv { 323 | padding-top: 5px; 324 | padding-left: 10px; 325 | padding-bottom: 5px; 326 | padding-right: 75px; 327 | background-color: darkblue; 328 | width: 100%; 329 | height: 100%; 330 | } 331 | 332 | .olControlLayerSwitcher .layersDiv .baseLbl, 333 | .olControlLayerSwitcher .layersDiv .dataLbl { 334 | margin-top: 3px; 335 | margin-left: 3px; 336 | margin-bottom: 3px; 337 | } 338 | 339 | .olControlLayerSwitcher .layersDiv .baseLayersDiv, 340 | .olControlLayerSwitcher .layersDiv .dataLayersDiv { 341 | padding-left: 10px; 342 | } 343 | 344 | .olControlLayerSwitcher .maximizeDiv, 345 | .olControlLayerSwitcher .minimizeDiv { 346 | top: 5px; 347 | right: 0; 348 | cursor: pointer; 349 | } 350 | 351 | .olBingAttribution { 352 | color: #DDD; 353 | } 354 | .olBingAttribution.road { 355 | color: #333; 356 | } 357 | 358 | .olGoogleAttribution.hybrid, .olGoogleAttribution.satellite { 359 | color: #EEE; 360 | } 361 | .olGoogleAttribution { 362 | color: #333; 363 | } 364 | span.olGoogleAttribution a { 365 | color: #77C; 366 | } 367 | span.olGoogleAttribution.hybrid a, span.olGoogleAttribution.satellite a { 368 | color: #EEE; 369 | } 370 | 371 | /** 372 | * Editing and navigation icons. 373 | * (using the editing_tool_bar.png sprint image) 374 | */ 375 | .olControlNavToolbar , 376 | .olControlEditingToolbar { 377 | margin: 5px 5px 0 0; 378 | } 379 | .olControlNavToolbar div, 380 | .olControlEditingToolbar div { 381 | background-image: url("img/editing_tool_bar.png"); 382 | background-repeat: no-repeat; 383 | margin: 0 0 5px 5px; 384 | width: 24px; 385 | height: 22px; 386 | cursor: pointer 387 | } 388 | /* positions */ 389 | .olControlEditingToolbar { 390 | right: 0; 391 | top: 0; 392 | } 393 | .olControlNavToolbar { 394 | top: 295px; 395 | left: 9px; 396 | } 397 | /* layouts */ 398 | .olControlEditingToolbar div { 399 | float: right; 400 | } 401 | /* individual controls */ 402 | .olControlNavToolbar .olControlNavigationItemInactive, 403 | .olControlEditingToolbar .olControlNavigationItemInactive { 404 | background-position: -103px -1px; 405 | } 406 | .olControlNavToolbar .olControlNavigationItemActive , 407 | .olControlEditingToolbar .olControlNavigationItemActive { 408 | background-position: -103px -24px; 409 | } 410 | .olControlNavToolbar .olControlZoomBoxItemInactive { 411 | background-position: -128px -1px; 412 | } 413 | .olControlNavToolbar .olControlZoomBoxItemActive { 414 | background-position: -128px -24px; 415 | } 416 | .olControlEditingToolbar .olControlDrawFeaturePointItemInactive { 417 | background-position: -77px -1px; 418 | } 419 | .olControlEditingToolbar .olControlDrawFeaturePointItemActive { 420 | background-position: -77px -24px; 421 | } 422 | .olControlEditingToolbar .olControlDrawFeaturePathItemInactive { 423 | background-position: -51px -1px; 424 | } 425 | .olControlEditingToolbar .olControlDrawFeaturePathItemActive { 426 | background-position: -51px -24px; 427 | } 428 | .olControlEditingToolbar .olControlDrawFeaturePolygonItemInactive{ 429 | background-position: -26px -1px; 430 | } 431 | .olControlEditingToolbar .olControlDrawFeaturePolygonItemActive { 432 | background-position: -26px -24px; 433 | } 434 | -------------------------------------------------------------------------------- /lib/OpenLayers/theme/default/style.tidy.css: -------------------------------------------------------------------------------- 1 | div.olMap{z-index:0;cursor:default;margin:0!important;padding:0!important;}div.olMapViewport{text-align:left;}.olLayerGoogleCopyright{left:2px;bottom:2px;}.olLayerGoogleV3.olLayerGoogleCopyright{right:auto!important;}.olLayerGooglePoweredBy{left:2px;bottom:15px;}.olLayerGoogleV3.olLayerGooglePoweredBy{bottom:15px!important;}.olControlAttribution{font-size:smaller;right:3px;bottom:4.5em;position:absolute;display:block;}.olControlScale{right:3px;bottom:3em;display:block;position:absolute;font-size:smaller;}.olControlScaleLine{display:block;position:absolute;left:10px;bottom:15px;font-size:xx-small;}.olControlScaleLineBottom{border:solid 2px #000;border-bottom:none;margin-top:-2px;text-align:center;}.olControlScaleLineTop{border:solid 2px #000;border-top:none;text-align:center;}.olControlPermalink{right:3px;bottom:1.5em;display:block;position:absolute;font-size:smaller;}div.olControlMousePosition{bottom:0;right:3px;display:block;position:absolute;font-family:Arial;font-size:smaller;}.olControlOverviewMapContainer{position:absolute;bottom:0;right:0;}.olControlOverviewMapElement{background-color:#00008B;-moz-border-radius:1em 0 0;padding:10px 18px 10px 10px;}.olControlOverviewMapExtentRectangle{overflow:hidden;background-image:url(img/blank.gif);cursor:move;border:2px dotted red;}.olControlOverviewMapRectReplacement{overflow:hidden;cursor:move;background-image:url(img/overview_replacement.gif);background-repeat:no-repeat;background-position:center;}.olLayerGeoRSSDescription{float:left;width:100%;overflow:auto;font-size:1em;}.olLayerGeoRSSClose{float:right;color:gray;font-size:1.2em;margin-right:6px;font-family:sans-serif;}.olLayerGeoRSSTitle{float:left;font-size:1.2em;}.olControlNavigationHistory{background-image:url(img/navigation_history.png);background-repeat:no-repeat;width:24px;height:24px;}.olControlNavigationHistoryPreviousItemActive{background-position:0 0;}.olControlNavigationHistoryPreviousItemInactive{background-position:0 -24px;}.olControlNavigationHistoryNextItemActive{background-position:-24px 0;}.olControlNavigationHistoryNextItemInactive{background-position:-24px -24px;}div.olControlSaveFeaturesItemActive{background-image:url(img/save_features_on.png);background-repeat:no-repeat;background-position:0 1px;}div.olControlSaveFeaturesItemInactive{background-image:url(img/save_features_off.png);background-repeat:no-repeat;background-position:0 1px;}.olHandlerBoxZoomBox{border:2px solid red;position:absolute;background-color:#FFF;opacity:.5;font-size:1px;filter:alpha(opacity=50);}.olHandlerBoxSelectFeature{border:2px solid blue;position:absolute;background-color:#FFF;opacity:.5;font-size:1px;filter:alpha(opacity=50);}.olControlPanPanel{top:10px;left:5px;}.olControlPanPanel div{background-image:url(img/pan-panel.png);height:18px;width:18px;cursor:pointer;position:absolute;}.olControlPanPanel .olControlPanNorthItemInactive{top:0;left:9px;background-position:0 0;}.olControlPanPanel .olControlPanSouthItemInactive{top:36px;left:9px;background-position:18px 0;}.olControlPanPanel .olControlPanWestItemInactive{position:absolute;top:18px;left:0;background-position:0 18px;}.olControlPanPanel .olControlPanEastItemInactive{top:18px;left:18px;background-position:18px 18px;}.olControlZoomPanel{top:71px;left:14px;}.olControlZoomPanel div{background-image:url(img/zoom-panel.png);position:absolute;height:18px;width:18px;cursor:pointer;}.olControlZoomPanel .olControlZoomInItemInactive{top:0;left:0;background-position:0 0;}.olControlZoomPanel .olControlZoomToMaxExtentItemInactive{top:18px;left:0;background-position:0 -18px;}.olControlZoomPanel .olControlZoomOutItemInactive{top:36px;left:0;background-position:0 18px;}.olControlPanZoomBar div{font-size:1px;}.olPopupCloseBox{background:url(img/close.gif) no-repeat;cursor:pointer;}.olImageLoadError{background-color:#FFC0CB;opacity:.5;filter:alpha(opacity=50);}.olCursorWait{cursor:wait;}.olDrawBox{cursor:crosshair;}.olControlDragFeatureActive.olControlDragFeatureOver.olDragDown{cursor:0;}.olControlLayerSwitcher{position:absolute;top:25px;right:0;width:20em;font-family:sans-serif;font-weight:700;margin-top:3px;margin-left:3px;margin-bottom:3px;font-size:smaller;color:#FFF;background-color:transparent;}.olControlLayerSwitcher .layersDiv{background-color:#00008B;width:100%;height:100%;padding:5px 75px 5px 10px;}.olControlLayerSwitcher .layersDiv .baseLbl,.olControlLayerSwitcher .layersDiv .dataLbl{margin-top:3px;margin-left:3px;margin-bottom:3px;}.olControlLayerSwitcher .layersDiv .baseLayersDiv,.olControlLayerSwitcher .layersDiv .dataLayersDiv{padding-left:10px;}.olControlLayerSwitcher .maximizeDiv,.olControlLayerSwitcher .minimizeDiv{top:5px;right:0;cursor:pointer;}.olBingAttribution{color:#DDD;}span.olGoogleAttribution a{color:#77C;}.olControlNavToolbar,.olControlEditingToolbar{margin:5px 5px 0 0;}.olControlNavToolbar div,.olControlEditingToolbar div{background-image:url(img/editing_tool_bar.png);background-repeat:no-repeat;width:24px;height:22px;cursor:pointer;margin:0 0 5px 5px;}.olControlEditingToolbar{right:0;top:0;}.olControlNavToolbar{top:295px;left:9px;}.olControlEditingToolbar div{float:right;}.olControlNavToolbar .olControlNavigationItemInactive,.olControlEditingToolbar .olControlNavigationItemInactive{background-position:-103px -1px;}.olControlNavToolbar .olControlNavigationItemActive,.olControlEditingToolbar .olControlNavigationItemActive{background-position:-103px -24px;}.olControlNavToolbar .olControlZoomBoxItemInactive{background-position:-128px -1px;}.olControlNavToolbar .olControlZoomBoxItemActive{background-position:-128px -24px;}.olControlEditingToolbar .olControlDrawFeaturePointItemInactive{background-position:-77px -1px;}.olControlEditingToolbar .olControlDrawFeaturePointItemActive{background-position:-77px -24px;}.olControlEditingToolbar .olControlDrawFeaturePathItemInactive{background-position:-51px -1px;}.olControlEditingToolbar .olControlDrawFeaturePathItemActive{background-position:-51px -24px;}.olControlEditingToolbar .olControlDrawFeaturePolygonItemInactive{background-position:-26px -1px;}.olControlEditingToolbar .olControlDrawFeaturePolygonItemActive{background-position:-26px -24px;}div.olLayerDiv,.olControlNoSelect{-khtml-user-select:none;-moz-user-select:none;}.olControlOverviewMapMinimizeButton,.olControlOverviewMapMaximizeButton{bottom:80px;cursor:pointer;right:0;}.olPopupContent,.olFramedCloudPopupContent{overflow:auto;padding:5px;}.olDragDown,.olControlDragFeatureOver{cursor:move;}.olBingAttribution.road,.olGoogleAttribution{color:#333;}.olGoogleAttribution.hybrid,.olGoogleAttribution.satellite,span.olGoogleAttribution.hybrid a,span.olGoogleAttribution.satellite a{color:#EEE;} -------------------------------------------------------------------------------- /lib/binaryajax.js: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Binary Ajax 0.1.7 4 | * Copyright (c) 2008 Jacob Seidelin, cupboy@gmail.com, http://blog.nihilogic.dk/ 5 | * Licensed under the MPL License [http://www.nihilogic.dk/licenses/mpl-license.txt] 6 | */ 7 | 8 | 9 | var BinaryFile = function(strData, iDataOffset, iDataLength) { 10 | var data = strData; 11 | var dataOffset = iDataOffset || 0; 12 | var dataLength = 0; 13 | 14 | this.getRawData = function() { 15 | return data; 16 | } 17 | 18 | if (typeof strData == "string") { 19 | dataLength = iDataLength || data.length; 20 | 21 | this.getByteAt = function(iOffset) { 22 | return data.charCodeAt(iOffset + dataOffset) & 0xFF; 23 | } 24 | } else if (typeof strData == "unknown") { 25 | dataLength = iDataLength || IEBinary_getLength(data); 26 | 27 | this.getByteAt = function(iOffset) { 28 | return IEBinary_getByteAt(data, iOffset + dataOffset); 29 | } 30 | } 31 | 32 | this.getLength = function() { 33 | return dataLength; 34 | } 35 | 36 | this.getSByteAt = function(iOffset) { 37 | var iByte = this.getByteAt(iOffset); 38 | if (iByte > 127) 39 | return iByte - 256; 40 | else 41 | return iByte; 42 | } 43 | 44 | this.getShortAt = function(iOffset, bBigEndian) { 45 | var iShort = bBigEndian ? 46 | (this.getByteAt(iOffset) << 8) + this.getByteAt(iOffset + 1) 47 | : (this.getByteAt(iOffset + 1) << 8) + this.getByteAt(iOffset) 48 | if (iShort < 0) iShort += 65536; 49 | return iShort; 50 | } 51 | this.getSShortAt = function(iOffset, bBigEndian) { 52 | var iUShort = this.getShortAt(iOffset, bBigEndian); 53 | if (iUShort > 32767) 54 | return iUShort - 65536; 55 | else 56 | return iUShort; 57 | } 58 | this.getLongAt = function(iOffset, bBigEndian) { 59 | var iByte1 = this.getByteAt(iOffset), 60 | iByte2 = this.getByteAt(iOffset + 1), 61 | iByte3 = this.getByteAt(iOffset + 2), 62 | iByte4 = this.getByteAt(iOffset + 3); 63 | 64 | var iLong = bBigEndian ? 65 | (((((iByte1 << 8) + iByte2) << 8) + iByte3) << 8) + iByte4 66 | : (((((iByte4 << 8) + iByte3) << 8) + iByte2) << 8) + iByte1; 67 | if (iLong < 0) iLong += 4294967296; 68 | return iLong; 69 | } 70 | this.getSLongAt = function(iOffset, bBigEndian) { 71 | var iULong = this.getLongAt(iOffset, bBigEndian); 72 | if (iULong > 2147483647) 73 | return iULong - 4294967296; 74 | else 75 | return iULong; 76 | } 77 | this.getStringAt = function(iOffset, iLength) { 78 | var aStr = []; 79 | for (var i=iOffset,j=0;i\r\n" 232 | + "Function IEBinary_getByteAt(strBinary, iOffset)\r\n" 233 | + " IEBinary_getByteAt = AscB(MidB(strBinary,iOffset+1,1))\r\n" 234 | + "End Function\r\n" 235 | + "Function IEBinary_getLength(strBinary)\r\n" 236 | + " IEBinary_getLength = LenB(strBinary)\r\n" 237 | + "End Function\r\n" 238 | + "\r\n" 239 | ); 240 | -------------------------------------------------------------------------------- /lib/excanvas.js: -------------------------------------------------------------------------------- 1 | // Copyright 2006 Google Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | 16 | // Known Issues: 17 | // 18 | // * Patterns are not implemented. 19 | // * Radial gradient are not implemented. The VML version of these look very 20 | // different from the canvas one. 21 | // * Clipping paths are not implemented. 22 | // * Coordsize. The width and height attribute have higher priority than the 23 | // width and height style values which isn't correct. 24 | // * Painting mode isn't implemented. 25 | // * Canvas width/height should is using content-box by default. IE in 26 | // Quirks mode will draw the canvas using border-box. Either change your 27 | // doctype to HTML5 28 | // (http://www.whatwg.org/specs/web-apps/current-work/#the-doctype) 29 | // or use Box Sizing Behavior from WebFX 30 | // (http://webfx.eae.net/dhtml/boxsizing/boxsizing.html) 31 | // * Optimize. There is always room for speed improvements. 32 | 33 | // only add this code if we do not already have a canvas implementation 34 | if (!window.CanvasRenderingContext2D) { 35 | 36 | (function () { 37 | 38 | // alias some functions to make (compiled) code shorter 39 | var m = Math; 40 | var mr = m.round; 41 | var ms = m.sin; 42 | var mc = m.cos; 43 | 44 | // this is used for sub pixel precision 45 | var Z = 10; 46 | var Z2 = Z / 2; 47 | 48 | var G_vmlCanvasManager_ = { 49 | init: function (opt_doc) { 50 | var doc = opt_doc || document; 51 | if (/MSIE/.test(navigator.userAgent) && !window.opera) { 52 | var self = this; 53 | doc.attachEvent("onreadystatechange", function () { 54 | self.init_(doc); 55 | }); 56 | } 57 | }, 58 | 59 | init_: function (doc) { 60 | if (doc.readyState == "complete") { 61 | // create xmlns 62 | if (!doc.namespaces["g_vml_"]) { 63 | doc.namespaces.add("g_vml_", "urn:schemas-microsoft-com:vml"); 64 | } 65 | 66 | // setup default css 67 | var ss = doc.createStyleSheet(); 68 | ss.cssText = "canvas{display:inline-block;overflow:hidden;" + 69 | // default size is 300x150 in Gecko and Opera 70 | "text-align:left;width:300px;height:150px}" + 71 | "g_vml_\\:*{behavior:url(#default#VML)}"; 72 | 73 | // find all canvas elements 74 | var els = doc.getElementsByTagName("canvas"); 75 | for (var i = 0; i < els.length; i++) { 76 | if (!els[i].getContext) { 77 | this.initElement(els[i]); 78 | } 79 | } 80 | } 81 | }, 82 | 83 | fixElement_: function (el) { 84 | // in IE before version 5.5 we would need to add HTML: to the tag name 85 | // but we do not care about IE before version 6 86 | var outerHTML = el.outerHTML; 87 | 88 | var newEl = el.ownerDocument.createElement(outerHTML); 89 | // if the tag is still open IE has created the children as siblings and 90 | // it has also created a tag with the name "/FOO" 91 | if (outerHTML.slice(-2) != "/>") { 92 | var tagName = "/" + el.tagName; 93 | var ns; 94 | // remove content 95 | while ((ns = el.nextSibling) && ns.tagName != tagName) { 96 | ns.removeNode(); 97 | } 98 | // remove the incorrect closing tag 99 | if (ns) { 100 | ns.removeNode(); 101 | } 102 | } 103 | el.parentNode.replaceChild(newEl, el); 104 | return newEl; 105 | }, 106 | 107 | /** 108 | * Public initializes a canvas element so that it can be used as canvas 109 | * element from now on. This is called automatically before the page is 110 | * loaded but if you are creating elements using createElement you need to 111 | * make sure this is called on the element. 112 | * @param {HTMLElement} el The canvas element to initialize. 113 | * @return {HTMLElement} the element that was created. 114 | */ 115 | initElement: function (el) { 116 | el = this.fixElement_(el); 117 | el.getContext = function () { 118 | if (this.context_) { 119 | return this.context_; 120 | } 121 | return this.context_ = new CanvasRenderingContext2D_(this); 122 | }; 123 | 124 | // do not use inline function because that will leak memory 125 | el.attachEvent('onpropertychange', onPropertyChange); 126 | el.attachEvent('onresize', onResize); 127 | 128 | var attrs = el.attributes; 129 | if (attrs.width && attrs.width.specified) { 130 | // TODO: use runtimeStyle and coordsize 131 | // el.getContext().setWidth_(attrs.width.nodeValue); 132 | el.style.width = attrs.width.nodeValue + "px"; 133 | } else { 134 | el.width = el.clientWidth; 135 | } 136 | if (attrs.height && attrs.height.specified) { 137 | // TODO: use runtimeStyle and coordsize 138 | // el.getContext().setHeight_(attrs.height.nodeValue); 139 | el.style.height = attrs.height.nodeValue + "px"; 140 | } else { 141 | el.height = el.clientHeight; 142 | } 143 | //el.getContext().setCoordsize_() 144 | return el; 145 | } 146 | }; 147 | 148 | function onPropertyChange(e) { 149 | var el = e.srcElement; 150 | 151 | switch (e.propertyName) { 152 | case 'width': 153 | el.style.width = el.attributes.width.nodeValue + "px"; 154 | el.getContext().clearRect(); 155 | break; 156 | case 'height': 157 | el.style.height = el.attributes.height.nodeValue + "px"; 158 | el.getContext().clearRect(); 159 | break; 160 | } 161 | } 162 | 163 | function onResize(e) { 164 | var el = e.srcElement; 165 | if (el.firstChild) { 166 | el.firstChild.style.width = el.clientWidth + 'px'; 167 | el.firstChild.style.height = el.clientHeight + 'px'; 168 | } 169 | } 170 | 171 | G_vmlCanvasManager_.init(); 172 | 173 | // precompute "00" to "FF" 174 | var dec2hex = []; 175 | for (var i = 0; i < 16; i++) { 176 | for (var j = 0; j < 16; j++) { 177 | dec2hex[i * 16 + j] = i.toString(16) + j.toString(16); 178 | } 179 | } 180 | 181 | function createMatrixIdentity() { 182 | return [ 183 | [1, 0, 0], 184 | [0, 1, 0], 185 | [0, 0, 1] 186 | ]; 187 | } 188 | 189 | function matrixMultiply(m1, m2) { 190 | var result = createMatrixIdentity(); 191 | 192 | for (var x = 0; x < 3; x++) { 193 | for (var y = 0; y < 3; y++) { 194 | var sum = 0; 195 | 196 | for (var z = 0; z < 3; z++) { 197 | sum += m1[x][z] * m2[z][y]; 198 | } 199 | 200 | result[x][y] = sum; 201 | } 202 | } 203 | return result; 204 | } 205 | 206 | function copyState(o1, o2) { 207 | o2.fillStyle = o1.fillStyle; 208 | o2.lineCap = o1.lineCap; 209 | o2.lineJoin = o1.lineJoin; 210 | o2.lineWidth = o1.lineWidth; 211 | o2.miterLimit = o1.miterLimit; 212 | o2.shadowBlur = o1.shadowBlur; 213 | o2.shadowColor = o1.shadowColor; 214 | o2.shadowOffsetX = o1.shadowOffsetX; 215 | o2.shadowOffsetY = o1.shadowOffsetY; 216 | o2.strokeStyle = o1.strokeStyle; 217 | o2.arcScaleX_ = o1.arcScaleX_; 218 | o2.arcScaleY_ = o1.arcScaleY_; 219 | } 220 | 221 | function processStyle(styleString) { 222 | var str, alpha = 1; 223 | 224 | styleString = String(styleString); 225 | if (styleString.substring(0, 3) == "rgb") { 226 | var start = styleString.indexOf("(", 3); 227 | var end = styleString.indexOf(")", start + 1); 228 | var guts = styleString.substring(start + 1, end).split(","); 229 | 230 | str = "#"; 231 | for (var i = 0; i < 3; i++) { 232 | str += dec2hex[Number(guts[i])]; 233 | } 234 | 235 | if ((guts.length == 4) && (styleString.substr(3, 1) == "a")) { 236 | alpha = guts[3]; 237 | } 238 | } else { 239 | str = styleString; 240 | } 241 | 242 | return [str, alpha]; 243 | } 244 | 245 | function processLineCap(lineCap) { 246 | switch (lineCap) { 247 | case "butt": 248 | return "flat"; 249 | case "round": 250 | return "round"; 251 | case "square": 252 | default: 253 | return "square"; 254 | } 255 | } 256 | 257 | /** 258 | * This class implements CanvasRenderingContext2D interface as described by 259 | * the WHATWG. 260 | * @param {HTMLElement} surfaceElement The element that the 2D context should 261 | * be associated with 262 | */ 263 | function CanvasRenderingContext2D_(surfaceElement) { 264 | this.m_ = createMatrixIdentity(); 265 | 266 | this.mStack_ = []; 267 | this.aStack_ = []; 268 | this.currentPath_ = []; 269 | 270 | // Canvas context properties 271 | this.strokeStyle = "#000"; 272 | this.fillStyle = "#000"; 273 | 274 | this.lineWidth = 1; 275 | this.lineJoin = "miter"; 276 | this.lineCap = "butt"; 277 | this.miterLimit = Z * 1; 278 | this.globalAlpha = 1; 279 | this.canvas = surfaceElement; 280 | 281 | var el = surfaceElement.ownerDocument.createElement('div'); 282 | el.style.width = surfaceElement.clientWidth + 'px'; 283 | el.style.height = surfaceElement.clientHeight + 'px'; 284 | el.style.overflow = 'hidden'; 285 | el.style.position = 'absolute'; 286 | surfaceElement.appendChild(el); 287 | 288 | this.element_ = el; 289 | this.arcScaleX_ = 1; 290 | this.arcScaleY_ = 1; 291 | }; 292 | 293 | var contextPrototype = CanvasRenderingContext2D_.prototype; 294 | contextPrototype.clearRect = function() { 295 | this.element_.innerHTML = ""; 296 | this.currentPath_ = []; 297 | }; 298 | 299 | contextPrototype.beginPath = function() { 300 | // TODO: Branch current matrix so that save/restore has no effect 301 | // as per safari docs. 302 | 303 | this.currentPath_ = []; 304 | }; 305 | 306 | contextPrototype.moveTo = function(aX, aY) { 307 | this.currentPath_.push({type: "moveTo", x: aX, y: aY}); 308 | this.currentX_ = aX; 309 | this.currentY_ = aY; 310 | }; 311 | 312 | contextPrototype.lineTo = function(aX, aY) { 313 | this.currentPath_.push({type: "lineTo", x: aX, y: aY}); 314 | this.currentX_ = aX; 315 | this.currentY_ = aY; 316 | }; 317 | 318 | contextPrototype.bezierCurveTo = function(aCP1x, aCP1y, 319 | aCP2x, aCP2y, 320 | aX, aY) { 321 | this.currentPath_.push({type: "bezierCurveTo", 322 | cp1x: aCP1x, 323 | cp1y: aCP1y, 324 | cp2x: aCP2x, 325 | cp2y: aCP2y, 326 | x: aX, 327 | y: aY}); 328 | this.currentX_ = aX; 329 | this.currentY_ = aY; 330 | }; 331 | 332 | contextPrototype.quadraticCurveTo = function(aCPx, aCPy, aX, aY) { 333 | // the following is lifted almost directly from 334 | // http://developer.mozilla.org/en/docs/Canvas_tutorial:Drawing_shapes 335 | var cp1x = this.currentX_ + 2.0 / 3.0 * (aCPx - this.currentX_); 336 | var cp1y = this.currentY_ + 2.0 / 3.0 * (aCPy - this.currentY_); 337 | var cp2x = cp1x + (aX - this.currentX_) / 3.0; 338 | var cp2y = cp1y + (aY - this.currentY_) / 3.0; 339 | this.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, aX, aY); 340 | }; 341 | 342 | contextPrototype.arc = function(aX, aY, aRadius, 343 | aStartAngle, aEndAngle, aClockwise) { 344 | aRadius *= Z; 345 | var arcType = aClockwise ? "at" : "wa"; 346 | 347 | var xStart = aX + (mc(aStartAngle) * aRadius) - Z2; 348 | var yStart = aY + (ms(aStartAngle) * aRadius) - Z2; 349 | 350 | var xEnd = aX + (mc(aEndAngle) * aRadius) - Z2; 351 | var yEnd = aY + (ms(aEndAngle) * aRadius) - Z2; 352 | 353 | // IE won't render arches drawn counter clockwise if xStart == xEnd. 354 | if (xStart == xEnd && !aClockwise) { 355 | xStart += 0.125; // Offset xStart by 1/80 of a pixel. Use something 356 | // that can be represented in binary 357 | } 358 | 359 | this.currentPath_.push({type: arcType, 360 | x: aX, 361 | y: aY, 362 | radius: aRadius, 363 | xStart: xStart, 364 | yStart: yStart, 365 | xEnd: xEnd, 366 | yEnd: yEnd}); 367 | 368 | }; 369 | 370 | contextPrototype.rect = function(aX, aY, aWidth, aHeight) { 371 | this.moveTo(aX, aY); 372 | this.lineTo(aX + aWidth, aY); 373 | this.lineTo(aX + aWidth, aY + aHeight); 374 | this.lineTo(aX, aY + aHeight); 375 | this.closePath(); 376 | }; 377 | 378 | contextPrototype.strokeRect = function(aX, aY, aWidth, aHeight) { 379 | // Will destroy any existing path (same as FF behaviour) 380 | this.beginPath(); 381 | this.moveTo(aX, aY); 382 | this.lineTo(aX + aWidth, aY); 383 | this.lineTo(aX + aWidth, aY + aHeight); 384 | this.lineTo(aX, aY + aHeight); 385 | this.closePath(); 386 | this.stroke(); 387 | }; 388 | 389 | contextPrototype.fillRect = function(aX, aY, aWidth, aHeight) { 390 | // Will destroy any existing path (same as FF behaviour) 391 | this.beginPath(); 392 | this.moveTo(aX, aY); 393 | this.lineTo(aX + aWidth, aY); 394 | this.lineTo(aX + aWidth, aY + aHeight); 395 | this.lineTo(aX, aY + aHeight); 396 | this.closePath(); 397 | this.fill(); 398 | }; 399 | 400 | contextPrototype.createLinearGradient = function(aX0, aY0, aX1, aY1) { 401 | var gradient = new CanvasGradient_("gradient"); 402 | return gradient; 403 | }; 404 | 405 | contextPrototype.createRadialGradient = function(aX0, aY0, 406 | aR0, aX1, 407 | aY1, aR1) { 408 | var gradient = new CanvasGradient_("gradientradial"); 409 | gradient.radius1_ = aR0; 410 | gradient.radius2_ = aR1; 411 | gradient.focus_.x = aX0; 412 | gradient.focus_.y = aY0; 413 | return gradient; 414 | }; 415 | 416 | contextPrototype.drawImage = function (image, var_args) { 417 | var dx, dy, dw, dh, sx, sy, sw, sh; 418 | 419 | // to find the original width we overide the width and height 420 | var oldRuntimeWidth = image.runtimeStyle.width; 421 | var oldRuntimeHeight = image.runtimeStyle.height; 422 | image.runtimeStyle.width = 'auto'; 423 | image.runtimeStyle.height = 'auto'; 424 | 425 | // get the original size 426 | var w = image.width; 427 | var h = image.height; 428 | 429 | // and remove overides 430 | image.runtimeStyle.width = oldRuntimeWidth; 431 | image.runtimeStyle.height = oldRuntimeHeight; 432 | 433 | if (arguments.length == 3) { 434 | dx = arguments[1]; 435 | dy = arguments[2]; 436 | sx = sy = 0; 437 | sw = dw = w; 438 | sh = dh = h; 439 | } else if (arguments.length == 5) { 440 | dx = arguments[1]; 441 | dy = arguments[2]; 442 | dw = arguments[3]; 443 | dh = arguments[4]; 444 | sx = sy = 0; 445 | sw = w; 446 | sh = h; 447 | } else if (arguments.length == 9) { 448 | sx = arguments[1]; 449 | sy = arguments[2]; 450 | sw = arguments[3]; 451 | sh = arguments[4]; 452 | dx = arguments[5]; 453 | dy = arguments[6]; 454 | dw = arguments[7]; 455 | dh = arguments[8]; 456 | } else { 457 | throw "Invalid number of arguments"; 458 | } 459 | 460 | var d = this.getCoords_(dx, dy); 461 | 462 | var w2 = sw / 2; 463 | var h2 = sh / 2; 464 | 465 | var vmlStr = []; 466 | 467 | var W = 10; 468 | var H = 10; 469 | 470 | // For some reason that I've now forgotten, using divs didn't work 471 | vmlStr.push(' ' , 510 | '', 518 | ''); 519 | 520 | this.element_.insertAdjacentHTML("BeforeEnd", 521 | vmlStr.join("")); 522 | }; 523 | 524 | contextPrototype.stroke = function(aFill) { 525 | var lineStr = []; 526 | var lineOpen = false; 527 | var a = processStyle(aFill ? this.fillStyle : this.strokeStyle); 528 | var color = a[0]; 529 | var opacity = a[1] * this.globalAlpha; 530 | 531 | var W = 10; 532 | var H = 10; 533 | 534 | lineStr.push(' max.x) { 594 | max.x = c.x; 595 | } 596 | if (min.y == null || c.y < min.y) { 597 | min.y = c.y; 598 | } 599 | if (max.y == null || c.y > max.y) { 600 | max.y = c.y; 601 | } 602 | } 603 | } 604 | lineStr.push(' ">'); 605 | 606 | if (typeof this.fillStyle == "object") { 607 | var focus = {x: "50%", y: "50%"}; 608 | var width = (max.x - min.x); 609 | var height = (max.y - min.y); 610 | var dimension = (width > height) ? width : height; 611 | 612 | focus.x = mr((this.fillStyle.focus_.x / width) * 100 + 50) + "%"; 613 | focus.y = mr((this.fillStyle.focus_.y / height) * 100 + 50) + "%"; 614 | 615 | var colors = []; 616 | 617 | // inside radius (%) 618 | if (this.fillStyle.type_ == "gradientradial") { 619 | var inside = (this.fillStyle.radius1_ / dimension * 100); 620 | 621 | // percentage that outside radius exceeds inside radius 622 | var expansion = (this.fillStyle.radius2_ / dimension * 100) - inside; 623 | } else { 624 | var inside = 0; 625 | var expansion = 100; 626 | } 627 | 628 | var insidecolor = {offset: null, color: null}; 629 | var outsidecolor = {offset: null, color: null}; 630 | 631 | // We need to sort 'colors' by percentage, from 0 > 100 otherwise ie 632 | // won't interpret it correctly 633 | this.fillStyle.colors_.sort(function (cs1, cs2) { 634 | return cs1.offset - cs2.offset; 635 | }); 636 | 637 | for (var i = 0; i < this.fillStyle.colors_.length; i++) { 638 | var fs = this.fillStyle.colors_[i]; 639 | 640 | colors.push( (fs.offset * expansion) + inside, "% ", fs.color, ","); 641 | 642 | if (fs.offset > insidecolor.offset || insidecolor.offset == null) { 643 | insidecolor.offset = fs.offset; 644 | insidecolor.color = fs.color; 645 | } 646 | 647 | if (fs.offset < outsidecolor.offset || outsidecolor.offset == null) { 648 | outsidecolor.offset = fs.offset; 649 | outsidecolor.color = fs.color; 650 | } 651 | } 652 | colors.pop(); 653 | 654 | lineStr.push(''); 661 | } else if (aFill) { 662 | lineStr.push(''); 663 | } else { 664 | lineStr.push( 665 | '' 672 | ); 673 | } 674 | 675 | lineStr.push(""); 676 | 677 | this.element_.insertAdjacentHTML("beforeEnd", lineStr.join("")); 678 | 679 | this.currentPath_ = []; 680 | }; 681 | 682 | contextPrototype.fill = function() { 683 | this.stroke(true); 684 | } 685 | 686 | contextPrototype.closePath = function() { 687 | this.currentPath_.push({type: "close"}); 688 | }; 689 | 690 | /** 691 | * @private 692 | */ 693 | contextPrototype.getCoords_ = function(aX, aY) { 694 | return { 695 | x: Z * (aX * this.m_[0][0] + aY * this.m_[1][0] + this.m_[2][0]) - Z2, 696 | y: Z * (aX * this.m_[0][1] + aY * this.m_[1][1] + this.m_[2][1]) - Z2 697 | } 698 | }; 699 | 700 | contextPrototype.save = function() { 701 | var o = {}; 702 | copyState(this, o); 703 | this.aStack_.push(o); 704 | this.mStack_.push(this.m_); 705 | this.m_ = matrixMultiply(createMatrixIdentity(), this.m_); 706 | }; 707 | 708 | contextPrototype.restore = function() { 709 | copyState(this.aStack_.pop(), this); 710 | this.m_ = this.mStack_.pop(); 711 | }; 712 | 713 | contextPrototype.translate = function(aX, aY) { 714 | var m1 = [ 715 | [1, 0, 0], 716 | [0, 1, 0], 717 | [aX, aY, 1] 718 | ]; 719 | 720 | this.m_ = matrixMultiply(m1, this.m_); 721 | }; 722 | 723 | contextPrototype.transform = function(m11, m12, m21, m22, dx, dy) { 724 | var m1 = [ 725 | [m11, m12, 0], 726 | [m21, m22, 0], 727 | [ dx, dy, 1] 728 | ]; 729 | 730 | this.m_ = matrixMultiply(m1, this.m_); 731 | }; 732 | 733 | contextPrototype.rotate = function(aRot) { 734 | var c = mc(aRot); 735 | var s = ms(aRot); 736 | 737 | var m1 = [ 738 | [c, s, 0], 739 | [-s, c, 0], 740 | [0, 0, 1] 741 | ]; 742 | 743 | this.m_ = matrixMultiply(m1, this.m_); 744 | }; 745 | 746 | contextPrototype.scale = function(aX, aY) { 747 | this.arcScaleX_ *= aX; 748 | this.arcScaleY_ *= aY; 749 | var m1 = [ 750 | [aX, 0, 0], 751 | [0, aY, 0], 752 | [0, 0, 1] 753 | ]; 754 | 755 | this.m_ = matrixMultiply(m1, this.m_); 756 | }; 757 | 758 | /******** STUBS ********/ 759 | contextPrototype.clip = function() { 760 | // TODO: Implement 761 | }; 762 | 763 | contextPrototype.arcTo = function() { 764 | // TODO: Implement 765 | }; 766 | 767 | contextPrototype.createPattern = function() { 768 | return new CanvasPattern_; 769 | }; 770 | 771 | // Gradient / Pattern Stubs 772 | function CanvasGradient_(aType) { 773 | this.type_ = aType; 774 | this.radius1_ = 0; 775 | this.radius2_ = 0; 776 | this.colors_ = []; 777 | this.focus_ = {x: 0, y: 0}; 778 | } 779 | 780 | CanvasGradient_.prototype.addColorStop = function(aOffset, aColor) { 781 | aColor = processStyle(aColor); 782 | this.colors_.push({offset: 1-aOffset, color: aColor}); 783 | }; 784 | 785 | function CanvasPattern_() {} 786 | 787 | // set up externs 788 | G_vmlCanvasManager = G_vmlCanvasManager_; 789 | CanvasRenderingContext2D = CanvasRenderingContext2D_; 790 | CanvasGradient = CanvasGradient_; 791 | CanvasPattern = CanvasPattern_; 792 | 793 | })(); 794 | 795 | } // if 796 | -------------------------------------------------------------------------------- /naturalearthdata.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Natural Earth - Javascript Shapefile and DBF Loader 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 54 | 82 | 83 | 84 |

Natural Earth

85 |

This is an experimental javascript shapefile viewer. For no reason in particular it doesn't really work in IE, sorry. Elsewhere, uninformative errors may appear in the dark crevices of your browser.

86 |

See http://github.com/RandomEtc/shapefile-js for more details.

87 |

110m Physical Vectors (10 layers)

88 |
89 |

110m Cultural Vectors (7 layers)

90 |
91 |

92 | 93 | 94 | -------------------------------------------------------------------------------- /naturalearthdata/110m-cultural.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/110m-cultural.zip -------------------------------------------------------------------------------- /naturalearthdata/110m-physical.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/110m-physical.zip -------------------------------------------------------------------------------- /naturalearthdata/NEV-Logo-Black_sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/NEV-Logo-Black_sm.png -------------------------------------------------------------------------------- /naturalearthdata/README: -------------------------------------------------------------------------------- 1 | Public domain shapefiles from http://www.naturalearthdata.com/ 2 | -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-0-boundary-lines.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-admin-0-boundary-lines.dbf -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-0-boundary-lines.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-0-boundary-lines.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-admin-0-boundary-lines.shp -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-0-boundary-lines.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-admin-0-boundary-lines.shx -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-0-countries.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-admin-0-countries.dbf -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-0-countries.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-0-countries.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-admin-0-countries.shp -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-0-countries.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-admin-0-countries.shx -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-0-pacific-groupings.dbf: -------------------------------------------------------------------------------- 1 | m Da+ScaleRankN 2 | FeatureClaC 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings 1Pacific Groupings  -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-0-pacific-groupings.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-0-pacific-groupings.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-admin-0-pacific-groupings.shp -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-0-pacific-groupings.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-admin-0-pacific-groupings.shx -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-0-tiny-countries.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-admin-0-tiny-countries.dbf -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-0-tiny-countries.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-0-tiny-countries.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-admin-0-tiny-countries.shp -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-0-tiny-countries.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-admin-0-tiny-countries.shx -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-1-states-provinces-lines-shp.dbf: -------------------------------------------------------------------------------- 1 | m na+ScaleRankN 2 | FeatureClaC 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines 21st Order Admin Lines  -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-1-states-provinces-lines-shp.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-1-states-provinces-lines-shp.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-admin-1-states-provinces-lines-shp.shp -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-1-states-provinces-lines-shp.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-admin-1-states-provinces-lines-shp.shx -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-1-states-provinces-poly-shp.dbf: -------------------------------------------------------------------------------- 1 | m 4a+ScaleRankN 2 | FeatureClaC 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys 21st Order Admin Polys  -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-1-states-provinces-poly-shp.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-1-states-provinces-poly-shp.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-admin-1-states-provinces-poly-shp.shp -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-admin-1-states-provinces-poly-shp.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-admin-1-states-provinces-poly-shp.shx -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-populated-places.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-populated-places.dbf -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-populated-places.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-populated-places.sbn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-populated-places.sbn -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-populated-places.sbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-populated-places.sbx -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-populated-places.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-populated-places.shp -------------------------------------------------------------------------------- /naturalearthdata/cultural/110m-populated-places.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/cultural/110m-populated-places.shx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-coastline.dbf: -------------------------------------------------------------------------------- 1 | m |a+ScaleRankN 2 | FeatureClaC 1Coastline 0Coastline 0Coastline 0Coastline 1Coastline 1Coastline 1Coastline 1Coastline 1Coastline 0Coastline 1Coastline 1Coastline 1Coastline 1Coastline 1Coastline 0Coastline 0Coastline 1Coastline 0Coastline 0Coastline 0Coastline 0Coastline 0Coastline 0Coastline 0Coastline 1Coastline 0Coastline 0Coastline 1Coastline 1Coastline 1Coastline 1Coastline 0Coastline 1Coastline 1Coastline 1Coastline 0Coastline 1Coastline 1Coastline 1Coastline 1Coastline 1Coastline 1Coastline 1Coastline 1Coastline 1Coastline 1Coastline 1Coastline 1Coastline 1Coastline 1Coastline 1Coastline 1Coastline 1Coastline 1Coastline 1Coastline 0Coastline 0Coastline 0Coastline 0Coastline 1Coastline 1Coastline 1Coastline 1Coastline 0Coastline 1Coastline 1Coastline 1Coastline 0Coastline 0Coastline 1Coastline 1Coastline 0Coastline 1Coastline 1Coastline 0Coastline 0Coastline 1Coastline 1Coastline 1Coastline 0Coastline 0Coastline 0Coastline 0Coastline 1Coastline 0Coastline 1Coastline 0Coastline 0Coastline 0Coastline 0Coastline 1Coastline 1Coastline 0Coastline 1Coastline 1Coastline 1Coastline 0Coastline 0Coastline 0Coastline 1Coastline 0Coastline 0Coastline 0Coastline 0Coastline 1Coastline 0Coastline 1Coastline 0Coastline 0Coastline 0Coastline 0Coastline 1Coastline 1Coastline 0Coastline 1Coastline 1Coastline 1Coastline 0Coastline 1Coastline 1Coastline 1Coastline 1Coastline 1Coastline  -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-coastline.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-coastline.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-coastline.shp -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-coastline.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-coastline.shx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-geography-marine-polys.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-geography-marine-polys.dbf -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-geography-marine-polys.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-geography-marine-polys.sbn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-geography-marine-polys.sbn -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-geography-marine-polys.sbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-geography-marine-polys.sbx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-geography-marine-polys.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-geography-marine-polys.shp -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-geography-marine-polys.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-geography-marine-polys.shx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-geography-regions-points.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-geography-regions-points.dbf -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-geography-regions-points.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-geography-regions-points.sbn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-geography-regions-points.sbn -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-geography-regions-points.sbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-geography-regions-points.sbx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-geography-regions-points.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-geography-regions-points.shp -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-geography-regions-points.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-geography-regions-points.shx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-geography-regions-polys.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-geography-regions-polys.dbf -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-geography-regions-polys.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-geography-regions-polys.sbn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-geography-regions-polys.sbn -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-geography-regions-polys.sbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-geography-regions-polys.sbx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-geography-regions-polys.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-geography-regions-polys.shp -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-geography-regions-polys.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-geography-regions-polys.shx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-glaciated-areas.dbf: -------------------------------------------------------------------------------- 1 | m  a+ScaleRankN 2 | FeatureClaC 0Glacier 0Glacier 0Glacier 0Glacier 0Glacier 0Glacier 0Glacier 0Glacier 0Glacier 0Glacier 0Glacier  -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-glaciated-areas.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-glaciated-areas.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-glaciated-areas.shp -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-glaciated-areas.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-glaciated-areas.shx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-1.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-graticules-1.dbf -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-1.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-1.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-graticules-1.shp -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-1.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-graticules-1.shx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-10.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-graticules-10.dbf -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-10.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-10.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-graticules-10.shp -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-10.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-graticules-10.shx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-15.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-graticules-15.dbf -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-15.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-15.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-graticules-15.shp -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-15.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-graticules-15.shx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-20.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-graticules-20.dbf -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-20.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-20.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-graticules-20.shp -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-20.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-graticules-20.shx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-30.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-graticules-30.dbf -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-30.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-30.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-graticules-30.shp -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-30.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-graticules-30.shx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-5.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-graticules-5.dbf -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-5.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-5.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-graticules-5.shp -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-graticules-5.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-graticules-5.shx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-wgs84-bounding-box.dbf: -------------------------------------------------------------------------------- 1 | m AFeatureClaC WGS84 bounding box  -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-wgs84-bounding-box.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-wgs84-bounding-box.sbn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-wgs84-bounding-box.sbn -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-wgs84-bounding-box.sbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-wgs84-bounding-box.sbx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-wgs84-bounding-box.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-wgs84-bounding-box.shp -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-wgs84-bounding-box.shp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2009120102103800TRUE{3AAE811D-75EC-4144-965F-CF05B72D78D3}\\5H070-9438\ProjectFiles\2009\BaseMaps\nev_final\110m\physical\WGS84 bounding boxfile://\\5H070-9438\ProjectFiles\2009\BaseMaps\nev_final\110m\physical\WGS84 bounding boxLocal Area NetworkDataset copied.C:\ProjectFiles\2009\BaseMaps\nev_final\50m\physical\WGS84 bounding box2009120102103800 4 | -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-graticules-all/110m-wgs84-bounding-box.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-graticules-all/110m-wgs84-bounding-box.shx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-lakes.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-lakes.dbf -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-lakes.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-lakes.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-lakes.shp -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-lakes.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-lakes.shx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-land.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-land.dbf -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-land.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-land.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-land.shp -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-land.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-land.shx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-ocean.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-ocean.dbf -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-ocean.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-ocean.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-ocean.shp -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-ocean.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-ocean.shx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-physical-geographic-lines.dbf: -------------------------------------------------------------------------------- 1 | m a$DISPLAYCScaleRankN 2 | Tropic of Capricorn 0 Tropic of Cancer 0 International Date Line 0 Equator 0 Arctic Circle 0 Antarctic Circle 0 -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-physical-geographic-lines.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-physical-geographic-lines.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-physical-geographic-lines.shp -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-physical-geographic-lines.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-physical-geographic-lines.shx -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-rivers-lake-centerlines.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-rivers-lake-centerlines.dbf -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-rivers-lake-centerlines.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-rivers-lake-centerlines.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-rivers-lake-centerlines.shp -------------------------------------------------------------------------------- /naturalearthdata/physical/110m-rivers-lake-centerlines.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/naturalearthdata/physical/110m-rivers-lake-centerlines.shx -------------------------------------------------------------------------------- /ol_simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Natural Earth - Javascript Shapefile and DBF Loader 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 32 | 33 | 34 |

Natural Earth

35 |

This is an experimental javascript shapefile viewer. For no reason in particular it doesn't really work in IE, sorry. Elsewhere, uninformative errors may appear in the dark crevices of your browser.

36 |

See http://github.com/RandomEtc/shapefile-js for more details.

37 |

110m Countries

38 |
39 |

40 | 41 | 42 | -------------------------------------------------------------------------------- /ol_simple.js: -------------------------------------------------------------------------------- 1 | // all the interaction stuff is copied almost verbatim from 2 | // http://www.openlayers.org/dev/examples/dynamic-text-layer.html 3 | 4 | window.onload = function () { 5 | map = new OpenLayers.Map('map', {sphericalMercator: true}); 6 | var osm = new OpenLayers.Layer.OSM({sphericalMercator: true}); 7 | 8 | var shpLayer = new OpenLayers.Layer.Vector({projection: new OpenLayers.Projection('EPSG:4326')}); 9 | map.addLayers([osm, shpLayer]); 10 | map.setCenter(new OpenLayers.LonLat(0, 0), 1); 11 | 12 | // Interaction; not needed for initial display. 13 | selectControl = new OpenLayers.Control.SelectFeature(shpLayer); 14 | map.addControl(selectControl); 15 | selectControl.activate(); 16 | shpLayer.events.on({ 17 | 'featureselected': onFeatureSelect, 18 | 'featureunselected': onFeatureUnselect 19 | }); 20 | 21 | // load the shapefile 22 | var theUrl = 'naturalearthdata/cultural/110m-admin-0-countries'; 23 | getOpenLayersFeatures(theUrl, function (fs) { 24 | // reproject features 25 | // this is ordinarily done by the format object, but since we're adding features manually we have to do it. 26 | var fsLen = fs.length; 27 | var inProj = new OpenLayers.Projection('EPSG:4326'); 28 | var outProj = new OpenLayers.Projection('EPSG:3857'); 29 | for (var i = 0; i < fsLen; i++) { 30 | fs[i].geometry = fs[i].geometry.transform(inProj, outProj); 31 | } 32 | shpLayer.addFeatures(fs); 33 | }); 34 | } 35 | 36 | 37 | // Needed only for interaction, not for the display. 38 | function onPopupClose(evt) { 39 | // 'this' is the popup. 40 | var feature = this.feature; 41 | if (feature.layer) { // The feature is not destroyed 42 | selectControl.unselect(feature); 43 | } else { // After "moveend" or "refresh" events on POIs layer all 44 | // features have been destroyed by the Strategy.BBOX 45 | this.destroy(); 46 | } 47 | } 48 | function onFeatureSelect(evt) { 49 | feature = evt.feature; 50 | var table = ''; 51 | for (var attr in feature.attributes.values) { 52 | table += ''; 53 | } 54 | table += '
' + attr + '' + feature.attributes.values[attr] + '
'; 55 | popup = new OpenLayers.Popup.FramedCloud("featurePopup", 56 | feature.geometry.getBounds().getCenterLonLat(), 57 | new OpenLayers.Size(100,100), table, null, true, onPopupClose); 58 | feature.popup = popup; 59 | popup.feature = feature; 60 | map.addPopup(popup, true); 61 | } 62 | function onFeatureUnselect(evt) { 63 | feature = evt.feature; 64 | if (feature.popup) { 65 | popup.feature = null; 66 | map.removePopup(feature.popup); 67 | feature.popup.destroy(); 68 | feature.popup = null; 69 | } 70 | } -------------------------------------------------------------------------------- /shp.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Javascript Shapefile Loader 4 | 5 | 6 | 7 | 8 | 112 | 124 | 125 | 126 |

Javascript Shapefile Loader

127 |

Loading shapefile... uninformative errors may appear in the dark crevices of your browser.

128 | 129 |

See http://github.com/RandomEtc/shapefile-js for more details.

130 | 131 | 132 | -------------------------------------------------------------------------------- /simple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Natural Earth - Javascript Shapefile and DBF Loader 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 25 | 48 | 49 | 50 |

Natural Earth

51 |

This is an experimental javascript shapefile viewer. For no reason in particular it doesn't really work in IE, sorry. Elsewhere, uninformative errors may appear in the dark crevices of your browser.

52 |

See http://github.com/RandomEtc/shapefile-js for more details.

53 |

110m Cultural Vectors (2 layers)

54 |
55 |

56 | 57 | 58 | -------------------------------------------------------------------------------- /src/binarywrapper.js: -------------------------------------------------------------------------------- 1 | // 2 | // stateful helper for binaryajax.js's BinaryFile class 3 | // 4 | // modelled on Flash's ByteArray, mostly, although some names 5 | // (int/short/long) differ in definition 6 | // 7 | 8 | function BinaryFileWrapper(binFile) { 9 | 10 | this.position = 0; 11 | this.bigEndian = true; 12 | 13 | this.getByte = function() { 14 | var byte = binFile.getByteAt(this.position); 15 | this.position++; 16 | return byte; 17 | } 18 | 19 | this.getLength = function() { 20 | return binFile.getLength(); 21 | } 22 | 23 | this.getSByte = function() { 24 | var sbyte = binFile.getSByteAt(this.position); 25 | this.position++; 26 | return sbyte; 27 | } 28 | 29 | this.getShort = function() { 30 | var short = binFile.getShortAt(this.position, this.bigEndian); 31 | this.position += 2; 32 | return short; 33 | } 34 | 35 | this.getSShort = function() { 36 | var sshort = binFile.getSShortAt(this.position, this.bigEndian); 37 | this.position += 2; 38 | return sshort; 39 | } 40 | 41 | this.getLong = function() { 42 | var l = binFile.getLongAt(this.position, this.bigEndian); 43 | this.position += 4; 44 | return l; 45 | } 46 | 47 | this.getSLong = function() { 48 | var l = binFile.getSLongAt(this.position, this.bigEndian); 49 | this.position += 4; 50 | return l; 51 | } 52 | 53 | this.getString = function(iLength) { 54 | var s = binFile.getStringAt(this.position, iLength); 55 | this.position += iLength; 56 | return s; 57 | } 58 | 59 | this.getDoubleAt = function(iOffset, bBigEndian) { 60 | // hugs stackoverflow 61 | // http://stackoverflow.com/questions/1597709/convert-a-string-with-a-hex-representation-of-an-ieee-754-double-into-javascript 62 | // TODO: check the endianness for something other than shapefiles 63 | // TODO: what about NaNs and Infinity? 64 | var a = binFile.getLongAt(iOffset + (bBigEndian ? 0 : 4), bBigEndian); 65 | var b = binFile.getLongAt(iOffset + (bBigEndian ? 4 : 0), bBigEndian); 66 | var s = a >> 31 ? -1 : 1; 67 | var e = (a >> 52 - 32 & 0x7ff) - 1023; 68 | return s * (a & 0xfffff | 0x100000) * 1.0 / Math.pow(2,52-32) * Math.pow(2, e) + b * 1.0 / Math.pow(2, 52) * Math.pow(2, e); 69 | } 70 | 71 | this.getDouble = function() { 72 | var d = this.getDoubleAt(this.position, this.bigEndian); 73 | this.position += 8; 74 | return d; 75 | } 76 | 77 | this.getChar = function() { 78 | var c = binFile.getCharAt(this.position); 79 | this.position++; 80 | return c; 81 | } 82 | } -------------------------------------------------------------------------------- /src/dbf.js: -------------------------------------------------------------------------------- 1 | // ported from http://code.google.com/p/vanrijkom-flashlibs/ under LGPL v2.1 2 | 3 | function DbfFile(binFile) { 4 | 5 | this.src = new BinaryFileWrapper(binFile); 6 | 7 | var t1 = new Date().getTime(); 8 | 9 | this.header = new DbfHeader(this.src); 10 | 11 | var t2 = new Date().getTime(); 12 | if (window.console && window.console.log) console.log('parsed dbf header in ' + (t2-t1) + ' ms'); 13 | 14 | t1 = new Date().getTime(); 15 | 16 | // TODO: could maybe be smarter about this and only parse these on demand 17 | this.records = []; 18 | for (var i = 0; i < this.header.recordCount; i++) { 19 | var record = this.getRecord(i); 20 | this.records.push(record); 21 | } 22 | 23 | t2 = new Date().getTime(); 24 | if (window.console && window.console.log) console.log('parsed dbf records in ' + (t2-t1) + ' ms'); 25 | 26 | } 27 | DbfFile.prototype.getRecord = function(index) { 28 | 29 | if (index > this.header.recordCount) { 30 | throw(new DbfError("",DbfError.ERROR_OUTOFBOUNDS)); 31 | } 32 | 33 | this.src.position = this.header.recordsOffset + index * this.header.recordSize; 34 | this.src.bigEndian = false; 35 | 36 | return new DbfRecord(this.src, this.header); 37 | } 38 | 39 | 40 | function DbfHeader(src) { 41 | 42 | // endian: 43 | src.bigEndian = false; 44 | 45 | this.version = src.getSByte(); 46 | this.updateYear = 1900+src.getByte(); 47 | this.updateMonth = src.getByte(); 48 | this.updateDay = src.getByte(); 49 | this.recordCount = src.getLong(); 50 | this.headerSize = src.getShort(); 51 | this.recordSize = src.getShort(); 52 | 53 | //skip 2: 54 | src.position += 2; 55 | 56 | this.incompleteTransaction = src.getByte(); 57 | this.encrypted = src.getByte(); 58 | 59 | // skip 12: 60 | src.position += 12; 61 | 62 | this.mdx = src.getByte(); 63 | this.language = src.getByte(); 64 | 65 | // skip 2; 66 | src.position += 2; 67 | 68 | // iterate field descriptors: 69 | this.fields = []; 70 | while (src.getSByte() != 0x0D){ 71 | src.position -= 1; 72 | this.fields.push(new DbfField(src)); 73 | } 74 | 75 | this.recordsOffset = this.headerSize+1; 76 | 77 | } 78 | 79 | function DbfField(src) { 80 | 81 | this.name = this.readZeroTermANSIString(src); 82 | 83 | // fixed length: 10, so: 84 | src.position += (10-this.name.length); 85 | 86 | this.type = src.getByte(); 87 | this.address = src.getLong(); 88 | this.length = src.getByte(); 89 | this.decimals = src.getByte(); 90 | 91 | // skip 2: 92 | src.position += 2; 93 | 94 | this.id = src.getByte(); 95 | 96 | // skip 2: 97 | src.position += 2; 98 | 99 | this.setFlag = src.getByte(); 100 | 101 | // skip 7: 102 | src.position += 7; 103 | 104 | this.indexFlag = src.getByte(); 105 | } 106 | DbfField.prototype.readZeroTermANSIString = function(src) { 107 | var r = []; 108 | var b; 109 | while (b = src.getByte()) { 110 | r[r.length] = String.fromCharCode(b); 111 | } 112 | return r.join(''); 113 | } 114 | 115 | function DbfRecord(src, header) { 116 | this.offset = src.position; 117 | this.values = {} 118 | for (var i = 0; i < header.fields.length; i++) { 119 | var field = header.fields[i]; 120 | this.values[field.name] = src.getString(field.length); 121 | } 122 | } -------------------------------------------------------------------------------- /src/layer.js: -------------------------------------------------------------------------------- 1 | function Layer(url, style) { 2 | 3 | var shpURL = url+'.shp'; 4 | var dbfURL = url+'.dbf'; 5 | this.style = style; 6 | 7 | var theLayer = this; 8 | 9 | this.render = function() { 10 | // it's a little bit "this"-ish... how to put all these member vars into scope? 11 | if (this.dbfFile && this.shpFile) { 12 | var ctx = this.canvas.getContext('2d'); 13 | ctx.clearRect(0,0,this.canvas.width,this.canvas.height); 14 | if (this.shpFile.header.shapeType == ShpType.SHAPE_POLYGON || this.shpFile.header.shapeType == ShpType.SHAPE_POLYLINE) { 15 | renderPolygons(this.canvas, this.shpFile.records, this.dbfFile.records, this.box, this.style); 16 | } 17 | else if (this.shpFile.header.shapeType == ShpType.SHAPE_POINT) { 18 | renderPoints(this.canvas, this.shpFile.records, this.dbfFile.records, this.box, this.style); 19 | } 20 | } 21 | } 22 | 23 | var onShpFail = function() { 24 | alert('failed to load ' + theLayer.shpURL); 25 | }; 26 | var onDbfFail = function() { 27 | alert('failed to load ' + theLayer.dbfURL); 28 | } 29 | 30 | var onShpComplete = function(oHTTP) { 31 | var binFile = oHTTP.binaryResponse; 32 | log('got data for ' + theLayer.shpURL + ', parsing shapefile'); 33 | theLayer.shpFile = new ShpFile(binFile); 34 | if (theLayer.dbfFile) theLayer.render(); 35 | } 36 | 37 | var onDbfComplete = function(oHTTP) { 38 | var binFile = oHTTP.binaryResponse; 39 | log('got data for ' + theLayer.dbfURL + ', parsing dbf file'); 40 | theLayer.dbfFile = new DbfFile(binFile); 41 | if (theLayer.shpFile) theLayer.render(); 42 | } 43 | 44 | this.load = function() { 45 | this.shpURL = shpURL; 46 | this.dbfURL = dbfURL; 47 | this.shpLoader = new BinaryAjax(shpURL, onShpComplete, onShpFail); 48 | this.dbfLoader = new BinaryAjax(dbfURL, onDbfComplete, onDbfFail); 49 | } 50 | } 51 | 52 | function renderPoints(canvas, records, data, box, style) { 53 | 54 | log('rendering points'); 55 | 56 | var t1 = new Date().getTime(); 57 | log('starting rendering...'); 58 | 59 | var ctx = canvas.getContext('2d'); 60 | 61 | var sc = Math.min(canvas.width / box.width, canvas.height / box.height); 62 | 63 | if (style.fillStyle) ctx.fillStyle = style.fillStyle; 64 | if (style.strokeStyle) ctx.strokeStyle = style.strokeStyle; 65 | if (style.lineWidth) ctx.lineWidth = style.lineWidth; 66 | 67 | // TODO: style attributes for point type (circle, square) and size/radius 68 | 69 | for (var i = 0; i < records.length; i++) { 70 | var record = records[i]; 71 | if (record.shapeType == ShpType.SHAPE_POINT) { 72 | var shp = record.shape; 73 | if (style.fillStyle) { 74 | ctx.fillRect(-1.5 + (shp.x - box.x) * sc, -1.5 + canvas.height - (shp.y - box.y) * sc, 3, 3); 75 | } 76 | if (style.strokeStyle) { 77 | ctx.strokeRect(-1.5 + (shp.x - box.x) * sc, -1.5 + canvas.height - (shp.y - box.y) * sc, 3, 3); 78 | } 79 | } 80 | } 81 | 82 | if ((style.textFill || style.textStroke) && style.textProp) { 83 | 84 | if (!style.helper) { 85 | style.helper = document.createElement('canvas'); 86 | style.helper.width = canvas.width; 87 | style.helper.height = canvas.height; 88 | // TODO: fix for IE? 89 | } 90 | 91 | var helper = style.helper.getContext('2d'); 92 | helper.clearRect(0,0,style.helper.width,style.helper.height); 93 | helper.fillStyle = 'black'; 94 | 95 | //var helper = ctx; 96 | 97 | if (style.font) ctx.font = style.font; 98 | if (style.textFill) ctx.fillStyle = style.textFill; 99 | if (style.textStroke) { 100 | ctx.strokeStyle = style.textStroke; 101 | ctx.lineJoin = 'round'; 102 | ctx.lineCap = 'round'; 103 | ctx.lineWidth = style.textHalo || 1; 104 | } 105 | ctx.textAlign = 'left'; 106 | ctx.textBaseline = 'middle'; 107 | for (var i = 0; i < records.length; i++) { 108 | if (data[i] && data[i].values && data[i].values[style.textProp]) { 109 | var record = records[i]; 110 | if (record.shapeType == ShpType.SHAPE_POINT) { 111 | var shp = record.shape; 112 | var text = trim(data[i].values[style.textProp]); 113 | var tx = Math.round(3 + (shp.x - box.x) * sc); 114 | var ty = Math.round(canvas.height - (shp.y - box.y) * sc); 115 | var tw = Math.round(ctx.measureText(text).width); 116 | var th = 12; 117 | 118 | if (tx < 0 || tx+tw >= canvas.width || ty-th/2 < 0 || ty+th/2 >= canvas.height) continue; 119 | 120 | var img = helper.getImageData(tx+tw/2,ty,1,1); 121 | if (img.data[3]) continue; 122 | var img = helper.getImageData(tx,ty-th/2,1,1); 123 | if (img.data[3]) continue; 124 | img = helper.getImageData(tx+tw,ty-th/2,1,1); 125 | if (img.data[3]) continue; 126 | img = helper.getImageData(tx+tw,ty+th/2,1,1); 127 | if (img.data[3]) continue; 128 | img = helper.getImageData(tx,ty+th/2,1,1); 129 | if (img.data[3]) continue; 130 | 131 | helper.fillRect(tx, ty-th/2, tw, th); 132 | 133 | if (style.textStroke) ctx.strokeText(text, tx, ty); 134 | if (style.textFill) ctx.fillText(text, tx, ty); 135 | } 136 | } 137 | else { 138 | log(data[i].values); 139 | } 140 | } 141 | } 142 | 143 | t2 = new Date().getTime(); 144 | log('done rendering in ' + (t2 - t1) + ' ms'); 145 | } 146 | 147 | // from http://blog.stevenlevithan.com/archives/faster-trim-javascript 148 | function trim(str) { 149 | var str = str.replace(/^\s\s*/, ''), 150 | ws = /\s/, 151 | i = str.length; 152 | while (ws.test(str.charAt(--i))); 153 | return str.slice(0, i + 1); 154 | } 155 | 156 | function renderPolygons(canvas, records, data, box, style) { 157 | 158 | log('rendering polygons'); 159 | 160 | var t1 = new Date().getTime(); 161 | log('starting rendering...'); 162 | 163 | var ctx = canvas.getContext('2d'); 164 | 165 | var sc = Math.min(canvas.width / box.width, canvas.height / box.height); 166 | 167 | if (style) { 168 | for (var p in style) { 169 | ctx[p] = style[p]; 170 | } 171 | } 172 | for (var i = 0; i < records.length; i++) { 173 | var record = records[i]; 174 | if (record.shapeType == ShpType.SHAPE_POLYGON || record.shapeType == ShpType.SHAPE_POLYLINE) { 175 | var shp = record.shape; 176 | ctx.beginPath(); 177 | for (var j = 0; j < shp.rings.length; j++) { 178 | var ring = shp.rings[j]; 179 | if (ring.length < 1) continue; 180 | ctx.moveTo((ring[0].x - box.x) * sc, canvas.height - (ring[0].y - box.y) * sc); 181 | for (var k = 1; k < ring.length; k++) { 182 | ctx.lineTo((ring[k].x - box.x) * sc, canvas.height - (ring[k].y - box.y) * sc); 183 | } 184 | } 185 | if (style.fillStyle && record.shapeType == ShpType.SHAPE_POLYGON) { 186 | ctx.fill(); 187 | } 188 | if (style.strokeStyle) { 189 | ctx.stroke(); 190 | } 191 | } 192 | } 193 | t2 = new Date().getTime(); 194 | log('done rendering in ' + (t2 - t1) + ' ms'); 195 | } -------------------------------------------------------------------------------- /src/map.js: -------------------------------------------------------------------------------- 1 | function log(s) { 2 | //if (window.console && window.console.log) console.log(s); 3 | } 4 | 5 | function Map(id, layers) { 6 | 7 | var parent = document.getElementById(id); 8 | if (!parent.style.position) parent.style.position = 'relative'; 9 | 10 | for (var i = 0; i < layers.length; i++) { 11 | log('creating canvas...'); 12 | 13 | var layer = layers[i]; 14 | 15 | var canvas = document.createElement('canvas'); 16 | canvas.style.position = 'absolute'; 17 | canvas.style.left = '0px'; 18 | canvas.style.top = '0px'; 19 | // TODO get these from parent properties or in constructor: 20 | canvas.style.width = '1024px'; 21 | canvas.style.height = '512px'; 22 | parent.appendChild(canvas); 23 | if (window.G_vmlCanvasManager) { 24 | canvas = G_vmlCanvasManager.initElement(canvas); 25 | } 26 | canvas.width = parseInt(canvas.style.width.match(/\d+/)); 27 | canvas.height = parseInt(canvas.style.height.match(/\d+/)); 28 | 29 | layer.canvas = canvas; 30 | layer.box = { x: -180, y: -90, width: 360, height: 180 }; 31 | 32 | layer.load(); 33 | } 34 | 35 | var box = { x: -180, y: -90, width: 360, height: 180 }; 36 | 37 | var render = function() { 38 | for (var i = 0; i < layers.length; i++) { 39 | layers[i].box = box; 40 | layers[i].render(); 41 | } 42 | } 43 | 44 | var panBy = function(x,y) { 45 | var degreesPerPixel = box.width / 1024.0; 46 | box.x -= x * degreesPerPixel; 47 | box.y += y * degreesPerPixel; 48 | render(); 49 | } 50 | 51 | var zoomBy = function(s,x,y) { 52 | var degreesPerPixel = box.width / 1024.0; 53 | var boxX = box.x + (x * degreesPerPixel) 54 | var boxY = box.y + ((512-y) * degreesPerPixel) 55 | box.x -= boxX; 56 | box.y -= boxY; 57 | box.x *= s; 58 | box.y *= s; 59 | box.width *= s; 60 | box.height *= s; 61 | box.x += boxX; 62 | box.y += boxY; 63 | render(); 64 | } 65 | 66 | var mouseDown = function(e) { 67 | var prevMouse = { x: e.clientX, y: e.clientY }; 68 | var mouseMove = function(e) { 69 | panBy(e.clientX - prevMouse.x, e.clientY - prevMouse.y); 70 | prevMouse.x = e.clientX; 71 | prevMouse.y = e.clientY; 72 | e.preventDefault(); // hopefully no selecting 73 | } 74 | var mouseUp = function(e) { 75 | document.body.style.cursor = null; 76 | document.removeEventListener('mousemove', mouseMove, false); 77 | document.removeEventListener('mouseup', mouseUp, false); 78 | } 79 | document.body.style.cursor = 'hand'; 80 | document.addEventListener('mousemove', mouseMove, false); 81 | document.addEventListener('mouseup', mouseUp, false); 82 | }; 83 | 84 | parent.addEventListener('mousedown', mouseDown, false); 85 | 86 | var mouseWheel = function(e) { 87 | 88 | var localX = e.clientX; 89 | var localY = e.clientY; 90 | 91 | // correct for scrolled document 92 | localX += document.body.scrollLeft + document.documentElement.scrollLeft; 93 | localY += document.body.scrollTop + document.documentElement.scrollTop; 94 | 95 | // correct for nested offsets in DOM 96 | for(var node = parent; node; node = node.offsetParent) { 97 | localX -= node.offsetLeft; 98 | localY -= node.offsetTop; 99 | } 100 | 101 | var delta = 0; 102 | if (e.wheelDelta) { 103 | delta = e.wheelDelta; 104 | } 105 | else if (e.detail) { 106 | delta = -e.detail; 107 | } 108 | 109 | if (delta > 0) { 110 | zoomBy(0.9, localX, localY); 111 | } 112 | else if (delta < 0) { 113 | zoomBy(1.1, localX, localY); 114 | } 115 | 116 | // cancel page scroll 117 | e.preventDefault(); 118 | } 119 | 120 | // Safari 121 | parent.addEventListener('mousewheel', mouseWheel, false); 122 | // Firefox 123 | parent.addEventListener('DOMMouseScroll', mouseWheel, false); 124 | 125 | } -------------------------------------------------------------------------------- /src/ol_shapefile.js: -------------------------------------------------------------------------------- 1 | // Contributed by Matt Conway , , Dec 2011. 2 | // Based on a copy of layer.js 3 | 4 | /** getOpenLayersFeatures 5 | * @param {String} url - the base url for the shapefile, without extensions 6 | * @param {Function} callback Called with an array of OpenLayers.Feature.Vector for the given URL 7 | */ 8 | function getOpenLayersFeatures(url, callback) { 9 | this.shpURL = url+'.shp'; 10 | this.dbfURL = url+'.dbf'; 11 | this.callback = callback; 12 | 13 | var instance = this; 14 | 15 | // Parse into OL features 16 | var parseShapefile = function () { 17 | // we can assume that shapefile and dbf have loaded at this point, but check anyhow 18 | if (!(instance.dbfFile && instance.shpFile)) return; 19 | 20 | var features = []; 21 | 22 | var recsLen = instance.shpFile.records.length; 23 | for (var i = 0; i < recsLen; i++) { 24 | var record = instance.shpFile.records[i]; 25 | var attrs = instance.dbfFile.records[i]; 26 | 27 | // turn shapefile geometry into WKT 28 | // points are easy! 29 | if (instance.shpFile.header.shapeType == ShpType.SHAPE_POINT) { 30 | var wkt = 'POINT(' + record.shape.x + ' ' + record.shape.y + ')'; 31 | } 32 | 33 | // lines: not too hard-- 34 | else if (instance.shpFile.header.shapeType == ShpType.SHAPE_POLYLINE) { 35 | // prepopulate the first point 36 | var points = [];//record.shape.rings[0].x + ' ' + record.shape.rings[0].y]; 37 | var pointsLen = record.shape.rings[0].length; 38 | for (var j = 0; j < pointsLen; j++) { 39 | points.push(record.shape.rings[0][j].x + ' ' + record.shape.rings[0][j].y); 40 | } 41 | 42 | var wkt = 'LINESTRING(' + points.join(', ') + ')'; 43 | } 44 | 45 | // polygons: donuts 46 | else if (instance.shpFile.header.shapeType == ShpType.SHAPE_POLYGON) { 47 | var ringsLen = record.shape.rings.length; 48 | var wktOuter = []; 49 | for (var j = 0; j < ringsLen; j++) { 50 | var ring = record.shape.rings[j]; 51 | if (ring.length < 1) continue; 52 | var wktInner = [];//ring.x + ' ' + ring.y]; 53 | var ringLen = ring.length; 54 | for (var k = 0; k < ringLen; k++) { 55 | wktInner.push(ring[k].x + ' ' + ring[k].y); 56 | } 57 | wktOuter.push('(' + wktInner.join(', ') + ')'); 58 | } 59 | var wkt = 'POLYGON(' + wktOuter.join(', ') + ')'; 60 | } 61 | 62 | var the_geom = OpenLayers.Geometry.fromWKT(wkt); 63 | features.push(new OpenLayers.Feature.Vector(the_geom, attrs)); 64 | } 65 | callback(features); 66 | }; 67 | 68 | var onShpFail = function() { 69 | alert('failed to load ' + instance.shpURL); 70 | }; 71 | var onDbfFail = function() { 72 | alert('failed to load ' + instance.dbfURL); 73 | } 74 | 75 | var onShpComplete = function(oHTTP) { 76 | var binFile = oHTTP.binaryResponse; 77 | console.log('got data for ' + instance.shpURL + ', parsing shapefile'); 78 | instance.shpFile = new ShpFile(binFile); 79 | if (instance.dbfFile) parseShapefile(); 80 | } 81 | 82 | var onDbfComplete = function(oHTTP) { 83 | var binFile = oHTTP.binaryResponse; 84 | console.log('got data for ' + instance.dbfURL + ', parsing dbf file'); 85 | instance.dbfFile = new DbfFile(binFile); 86 | if (instance.shpFile) parseShapefile(); 87 | } 88 | 89 | this.shpLoader = new BinaryAjax(shpURL, onShpComplete, onShpFail); 90 | this.dbfLoader = new BinaryAjax(dbfURL, onDbfComplete, onDbfFail); 91 | } 92 | -------------------------------------------------------------------------------- /src/shapefile.js: -------------------------------------------------------------------------------- 1 | // ported from http://code.google.com/p/vanrijkom-flashlibs/ under LGPL v2.1 2 | 3 | function ShpFile(binFile) { 4 | 5 | var src = new BinaryFileWrapper(binFile); 6 | 7 | var t1 = new Date().getTime(); 8 | this.header = new ShpHeader(src); 9 | 10 | var t2 = new Date().getTime(); 11 | if (window.console && window.console.log) console.log('parsed header in ' + (t2-t1) + ' ms'); 12 | 13 | if (window.console && window.console.log) console.log('got header, parsing records'); 14 | 15 | t1 = new Date().getTime(); 16 | this.records = []; 17 | while (true) { 18 | try { 19 | this.records.push(new ShpRecord(src)); 20 | } 21 | catch (e) { 22 | if (e.id !== ShpError.ERROR_NODATA) { 23 | alert(e); 24 | } 25 | break; 26 | } 27 | } 28 | 29 | t2 = new Date().getTime(); 30 | if (window.console && window.console.log) console.log('parsed records in ' + (t2-t1) + ' ms'); 31 | 32 | } 33 | 34 | /** 35 | * The ShpType class is a place holder for the ESRI Shapefile defined 36 | * shape types. 37 | * @author Edwin van Rijkom 38 | * 39 | */ 40 | var ShpType = { 41 | 42 | /** 43 | * Unknow Shape Type (for internal use) 44 | */ 45 | SHAPE_UNKNOWN : -1, 46 | /** 47 | * ESRI Shapefile Null Shape shape type. 48 | */ 49 | SHAPE_NULL : 0, 50 | /** 51 | * ESRI Shapefile Point Shape shape type. 52 | */ 53 | SHAPE_POINT : 1, 54 | /** 55 | * ESRI Shapefile PolyLine Shape shape type. 56 | */ 57 | SHAPE_POLYLINE : 3, 58 | /** 59 | * ESRI Shapefile Polygon Shape shape type. 60 | */ 61 | SHAPE_POLYGON : 5, 62 | /** 63 | * ESRI Shapefile Multipoint Shape shape type 64 | * (currently unsupported). 65 | */ 66 | SHAPE_MULTIPOINT : 8, 67 | /** 68 | * ESRI Shapefile PointZ Shape shape type. 69 | */ 70 | SHAPE_POINTZ : 11, 71 | /** 72 | * ESRI Shapefile PolylineZ Shape shape type 73 | * (currently unsupported). 74 | */ 75 | SHAPE_POLYLINEZ : 13, 76 | /** 77 | * ESRI Shapefile PolygonZ Shape shape type 78 | * (currently unsupported). 79 | */ 80 | SHAPE_POLYGONZ : 15, 81 | /** 82 | * ESRI Shapefile MultipointZ Shape shape type 83 | * (currently unsupported). 84 | */ 85 | SHAPE_MULTIPOINTZ : 18, 86 | /** 87 | * ESRI Shapefile PointM Shape shape type 88 | */ 89 | SHAPE_POINTM : 21, 90 | /** 91 | * ESRI Shapefile PolyLineM Shape shape type 92 | * (currently unsupported). 93 | */ 94 | SHAPE_POLYLINEM : 23, 95 | /** 96 | * ESRI Shapefile PolygonM Shape shape type 97 | * (currently unsupported). 98 | */ 99 | SHAPE_POLYGONM : 25, 100 | /** 101 | * ESRI Shapefile MultiPointM Shape shape type 102 | * (currently unsupported). 103 | */ 104 | SHAPE_MULTIPOINTM : 28, 105 | /** 106 | * ESRI Shapefile MultiPatch Shape shape type 107 | * (currently unsupported). 108 | */ 109 | SHAPE_MULTIPATCH : 31 110 | 111 | }; 112 | 113 | 114 | /** 115 | * Constructor. 116 | * @param src 117 | * @return 118 | * @throws ShpError Not a valid shape file header 119 | * @throws ShpError Not a valid signature 120 | * 121 | */ 122 | function ShpHeader(src) 123 | { 124 | if (src.getLength() < 100) 125 | alert("Not a valid shape file header (too small)"); 126 | 127 | if (src.getSLong() != 9994) 128 | alert("Not a valid signature. Expected 9994"); 129 | 130 | // skip 5 integers; 131 | src.position += 5*4; 132 | 133 | // read file-length: 134 | this.fileLength = src.getSLong(); 135 | 136 | // switch endian: 137 | src.bigEndian = false; 138 | 139 | // read version: 140 | this.version = src.getSLong(); 141 | 142 | // read shape-type: 143 | this.shapeType = src.getSLong(); 144 | 145 | // read bounds: 146 | this.boundsXY = { x: src.getDouble(), 147 | y: src.getDouble(), 148 | width: src.getDouble(), 149 | height: src.getDouble() }; 150 | 151 | this.boundsZ = { x: src.getDouble(), y: src.getDouble() }; 152 | 153 | this.boundsM = { x: src.getDouble(), y: src.getDouble() }; 154 | } 155 | 156 | 157 | function ShpRecord(src) { 158 | var availableBytes = src.getLength() - src.position; 159 | 160 | if (availableBytes == 0) 161 | throw(new ShpError("No Data", ShpError.ERROR_NODATA)); 162 | 163 | if (availableBytes < 8) 164 | throw(new ShpError("Not a valid record header (too small)")); 165 | 166 | src.bigEndian = true; 167 | 168 | this.number = src.getSLong(); 169 | this.contentLength = src.getSLong(); 170 | this.contentLengthBytes = this.contentLength*2 - 4; 171 | src.bigEndian = false; 172 | var shapeOffset = src.position; 173 | this.shapeType = src.getSLong(); 174 | 175 | switch(this.shapeType) { 176 | case ShpType.SHAPE_POINT: 177 | this.shape = new ShpPoint(src, this.contentLengthBytes); 178 | break; 179 | case ShpType.SHAPE_POINTZ: 180 | this.shape = new ShpPointZ(src, this.contentLengthBytes); 181 | break; 182 | case ShpType.SHAPE_POLYGON: 183 | this.shape = new ShpPolygon(src, this.contentLengthBytes); 184 | break; 185 | case ShpType.SHAPE_POLYLINE: 186 | this.shape = new ShpPolyline(src, this.contentLengthBytes); 187 | break; 188 | case ShpType.SHAPE_MULTIPATCH: 189 | case ShpType.SHAPE_MULTIPOINT: 190 | case ShpType.SHAPE_MULTIPOINTM: 191 | case ShpType.SHAPE_MULTIPOINTZ: 192 | case ShpType.SHAPE_POINTM: 193 | case ShpType.SHAPE_POLYGONM: 194 | case ShpType.SHAPE_POLYGONZ: 195 | case ShpType.SHAPE_POLYLINEZ: 196 | case ShpType.SHAPE_POLYLINEM: 197 | throw(new ShpError(this.shapeType+" Shape type is currently unsupported by this library")); 198 | break; 199 | default: 200 | throw(new ShpError("Encountered unknown shape type ("+this.shapeType+")")); 201 | break; 202 | } 203 | } 204 | 205 | function ShpPoint(src, size) { 206 | this.type = ShpType.SHAPE_POINT; 207 | if (src) { 208 | if (src.getLength() - src.position < size) 209 | throw(new ShpError("Not a Point record (too small)")); 210 | this.x = (size > 0) ? src.getDouble() : NaN; 211 | this.y = (size > 0) ? src.getDouble() : NaN; 212 | } 213 | } 214 | function ShpPointZ(src, size) { 215 | this.type = ShpType.SHAPE_POINTZ; 216 | if (src) { 217 | if (src.getLength() - src.position < size) 218 | throw(new ShpError("Not a Point record (too small)")); 219 | this.x = (size > 0) ? src.getDouble() : NaN; 220 | this.y = (size > 0) ? src.getDouble() : NaN; 221 | this.z = (size > 16) ? src.getDouble() : NaN; 222 | this.m = (size > 24) ? src.getDouble() : NaN; 223 | } 224 | } 225 | function ShpPolygon(src, size) { 226 | // for want of a super() 227 | ShpPolyline.apply(this, [src, size]); 228 | this.type = ShpType.SHAPE_POLYGON; 229 | } 230 | function ShpPolyline(src, size) { 231 | this.type = ShpType.SHAPE_POLYLINE; 232 | this.rings = []; 233 | if (src) { 234 | if (src.getLength() - src.position < size) 235 | throw(new ShpError("Not a Polygon record (too small)")); 236 | 237 | src.bigEndian = false; 238 | 239 | this.box = { x: src.getDouble(), 240 | y: src.getDouble(), 241 | width: src.getDouble(), 242 | height: src.getDouble() }; 243 | 244 | var rc = src.getSLong(); 245 | var pc = src.getSLong(); 246 | 247 | var ringOffsets = []; 248 | while(rc--) { 249 | var ringOffset = src.getSLong(); 250 | ringOffsets.push(ringOffset); 251 | } 252 | 253 | var points = []; 254 | while(pc--) { 255 | points.push(new ShpPoint(src,16)); 256 | } 257 | 258 | // convert points, and ringOffsets arrays to an array of rings: 259 | var removed = 0; 260 | var split; 261 | ringOffsets.shift(); 262 | while(ringOffsets.length) { 263 | split = ringOffsets.shift(); 264 | this.rings.push(points.splice(0,split-removed)); 265 | removed = split; 266 | } 267 | this.rings.push(points); 268 | } 269 | } 270 | 271 | function ShpError(msg, id) { 272 | this.msg = msg; 273 | this.id = id; 274 | this.toString = function() { 275 | return this.msg; 276 | }; 277 | } 278 | ShpError.ERROR_UNDEFINED = 0; 279 | // a 'no data' error is thrown when the byte array runs out of data. 280 | ShpError.ERROR_NODATA = 1; 281 | -------------------------------------------------------------------------------- /thematicmapping/Readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/thematicmapping/Readme.txt -------------------------------------------------------------------------------- /thematicmapping/TM_WORLD_BORDERS_SIMPL-0.3.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/thematicmapping/TM_WORLD_BORDERS_SIMPL-0.3.dbf -------------------------------------------------------------------------------- /thematicmapping/TM_WORLD_BORDERS_SIMPL-0.3.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] -------------------------------------------------------------------------------- /thematicmapping/TM_WORLD_BORDERS_SIMPL-0.3.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/thematicmapping/TM_WORLD_BORDERS_SIMPL-0.3.shp -------------------------------------------------------------------------------- /thematicmapping/TM_WORLD_BORDERS_SIMPL-0.3.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RandomEtc/shapefile-js/31c6deb02ce8516ef37db878bf2306beedcd2b4f/thematicmapping/TM_WORLD_BORDERS_SIMPL-0.3.shx --------------------------------------------------------------------------------