Tips for homework 2nd week
Author: firstname.lastname@example.org (Tim Blankers)
Tip 1: There is a bug in Chrome which prevents -local- files in your browser accessing the Geo Location data provided by HTML5. To work around this problem you could try using Firefox/Safari or installing a webserver such as Apache or the complete WAMP suite (credits to Bas!). Tip 2: The only editing you should be doing is in maps.js. In the function init(), map is declared as follows: map = new OpenLayers.Map("basicMap"); Since the var keyword lacks in this declaration, map is probably declared in the OpenLayers library itself. Thus after calling init(), this instance of map is accessible from any other function in this file. Perhaps you could call the setCenter function somewhere else as well?
This page has no comments.