->

23 July 2010

ESRI Shapefile - HTML5 Viewer


ESRI Shapefile - HTML5 Viewer

This is a neat way to display ESRI Shapefiles online without using any GIS software.
(Note: Not compatible with Internet Explorer)
Shapefile HTML Viewer loaded
Two shapefiles are displayed here cities of the world and associated text along with Countries of the World with a line style and  polygon fill style.

Notes: Keep shapefiles as small as possible, smaller shapefiles returns faster display results.
Faster than ArcIMS in some cases. But depends on the hosting server.



Shapefile HTML Viewer Mapperz
Mapperz Version, styles and fills changed, though seems slower, compare the difference.

The two files required are the .shp (geometry in lat/lng WGS84) and the .dbf (Table)
var map = new Map('map', [
    // country shapes
    new Layer('http://mapperz.110mb.com/shape/110m_admin_0_countries', 
{ fillStyle: '#76e97c', strokeStyle: '#18841D', lineWidth: '0.5' }),
    // dots for cities
    new Layer('http://mapperz.110mb.com/shape/110m_populated_places',
 { fillStyle: '#8A2BE2', /*textHalo: '3', textStroke: 'white',*/ textFill: 'rgba(255, 0, 0, 0.6)', 
textProp: 'Name', font: 'bold 9px sans-serif' })

  ]);
  Links [source code:]

More complex version involves 10 shapefile layers.

Labels: , , , ,

0 Comments:

Post a Comment

<< Home