Database Reference
In-Depth Information
// center map
var cpoint = new
OpenLayers.LonLat(-11000000, 4800000);
map.setCenter(cpoint, 3);
YourHTMLfileshouldnowlooklikethe
openlayers.html
filecontainedin
data/
chp09
. You can finally deploy this file to your web server (Apache httpd or IIS). If
you are using Apache httpd in Linux, you could copy the file to the
data
directory
under
/var/www
, and if you are using Windows, you could copy it to the data dir-
ectory under
C:\ms4w\Apache\htdocs
(create the
data
directory if it does not
already exist). Then, access it using the URL
http://localhost/data/open-
layers.html
.
Now,accessthe
openlayers
webpageusingyourfavoritebrowser.Startbrowsing
the map: zoom, pan, try to switch the base and overlays layers on and off using
thelayerswitchercontrol,andtrytoclickonapointtoidentifyonefeaturefromthe
counties PostGIS layer. A map is shown in the following screenshot: