From: <cph...@us...> - 2006-04-09 22:24:44
|
Revision: 37 Author: cphillip Date: 2006-04-09 15:24:39 -0700 (Sun, 09 Apr 2006) ViewCVS: http://svn.sourceforge.net/wnmap/?rev=37&view=rev Log Message: ----------- Rename prefix for JS context variables to WNMAP. Modified Paths: -------------- trunk/src/web/config.php.dist trunk/src/web/js/NodeMarker.js trunk/src/web/js/geocode.js trunk/src/web/js/nodemap.js Modified: trunk/src/web/config.php.dist =================================================================== --- trunk/src/web/config.php.dist 2006-04-09 22:19:46 UTC (rev 36) +++ trunk/src/web/config.php.dist 2006-04-09 22:24:39 UTC (rev 37) @@ -76,40 +76,40 @@ define ("ACCEPTABLE_DISTANCE", 70); // in miles $JS_CONFIG = array( - // SWNCFG_GEOCODE_STATE_ABBR + // WNMAP_GEOCODE_STATE_ABBR // Abbreviation of the state name we wish to restrict geocoding to. - "SWNCFG_GEOCODE_STATE_ABBR" => "WA", + "WNMAP_GEOCODE_STATE_ABBR" => "WA", - // SWNCFG_GEOCODE_STATE_NAME + // WNMAP_GEOCODE_STATE_NAME // Name of the state we wish to restrict geocoding to. - "SWNCFG_GEOCODE_STATE_NAME" => "Washington", + "WNMAP_GEOCODE_STATE_NAME" => "Washington", - "SWNCFG_MAP_START_LON" => MAP_CENTER_LONG, - "SWNCFG_MAP_START_LAT" => MAP_CENTER_LAT, - "SWNCFG_ACCEPTABLE_DISTANCE" => ACCEPTABLE_DISTANCE, + "WNMAP_MAP_START_LON" => MAP_CENTER_LONG, + "WNMAP_MAP_START_LAT" => MAP_CENTER_LAT, + "WNMAP_ACCEPTABLE_DISTANCE" => ACCEPTABLE_DISTANCE, - // SWNCFG_MAP_START_ZOOM + // WNMAP_MAP_START_ZOOM // Default zoom level // Possible values: <Int: 0-17> - "SWNCFG_MAP_START_ZOOM" => 4, + "WNMAP_MAP_START_ZOOM" => 4, - // SWNCFG_MAP_START_TYPE + // WNMAP_MAP_START_TYPE // Default map type // Possible values: <Enum> // 0 => Map // 1 => Satellite // 2 => Hybrid - "SWNCFG_MAP_START_TYPE" => 0, + "WNMAP_MAP_START_TYPE" => 0, - // SWNCFG_MAP_URL + // WNMAP_MAP_URL // Base URL of the map application // Possible values: <URL> - "SWNCFG_MAP_URL" => MAP_URL, + "WNMAP_MAP_URL" => MAP_URL, - // SWNCFG_NODE_URL + // WNMAP_NODE_URL // Base URL of the node database // Possible values: <URL> - "SWNCFG_NODE_URL" => "http://mywireless.net/", + "WNMAP_NODE_URL" => "http://mywireless.net/", ); // remove this line Modified: trunk/src/web/js/NodeMarker.js =================================================================== --- trunk/src/web/js/NodeMarker.js 2006-04-09 22:19:46 UTC (rev 36) +++ trunk/src/web/js/NodeMarker.js 2006-04-09 22:24:39 UTC (rev 37) @@ -17,7 +17,7 @@ this.statePretty = "Active Node"; var icon = new GIcon (); - icon.image = SWNCFG_MAP_URL + "/images/marker_active.png"; + icon.image = WNMAP_MAP_URL + "/images/marker_active.png"; icon.iconSize = new GSize(20, 34); icon.iconAnchor = new GPoint(9, 34); icon.infoWindowAnchor = new GPoint(20, 1); @@ -28,7 +28,7 @@ this.statePretty = "Potential Node"; var icon = new GIcon (); - icon.image = SWNCFG_MAP_URL + "/images/marker_potential.png"; + icon.image = WNMAP_MAP_URL + "/images/marker_potential.png"; icon.iconSize = new GSize(20, 34); icon.iconAnchor = new GPoint(9, 34); icon.infoWindowAnchor = new GPoint(20, 1); @@ -91,7 +91,7 @@ var addActionLink = document.createElement ("a"); addActionLink.innerHTML = "Add this to our database as a location for a potential node.<br/>"; - url = SWNCFG_MAP_URL + "/AddPotentialNode.php?lon=" + this.point.x + "&lat=" + this.point.y + "&name=" + URLEncode (this.name) + "&addr='" + encode64 (this.streetAddress) + "'"; + url = WNMAP_MAP_URL + "/AddPotentialNode.php?lon=" + this.point.x + "&lat=" + this.point.y + "&name=" + URLEncode (this.name) + "&addr='" + encode64 (this.streetAddress) + "'"; addActionLink.href = "javascript:window.open (url, null,'menubar=no,scrollbars=yes,addressbar=no,locationbar=no,status=no,height=530,width=440'); void(0);"; addActionItem.appendChild (addActionLink); @@ -168,7 +168,7 @@ var titleLink = document.createElement ("a"); titleLink.className = "title"; titleLink.innerHTML = this.name; - titleLink.href = SWNCFG_NODE_URL + this.name; + titleLink.href = WNMAP_NODE_URL + this.name; title.appendChild (titleLink); title.appendChild (document.createTextNode (' (' + this.description + ')')); thing.appendChild (title); Modified: trunk/src/web/js/geocode.js =================================================================== --- trunk/src/web/js/geocode.js 2006-04-09 22:19:46 UTC (rev 36) +++ trunk/src/web/js/geocode.js 2006-04-09 22:24:39 UTC (rev 37) @@ -35,7 +35,7 @@ } if (count == 0) { - document.getElementById ("findLocationResponse").innerHTML = "No results found. Note that search is currently restricted to a " + SWNCFG_ACCEPTABLE_DISTANCE + " mile radius of the center of the network, and that you must include a city in your search."; + document.getElementById ("findLocationResponse").innerHTML = "No results found. Note that search is currently restricted to a " + WNMAP_ACCEPTABLE_DISTANCE + " mile radius of the center of the network, and that you must include a city in your search."; document.getElementById ("findLocationResponse").className = "error"; } } else { @@ -52,11 +52,11 @@ function tooFarFromCenter (lat, lon) { var distance = distanceToCenterInMiles (lat, lon); - return ( distance > SWNCFG_ACCEPTABLE_DISTANCE ); + return ( distance > WNMAP_ACCEPTABLE_DISTANCE ); } function distanceToCenterInMiles (lat, lon) { - var p1 = new LatLong(SWNCFG_MAP_START_LAT, SWNCFG_MAP_START_LON); + var p1 = new LatLong(WNMAP_MAP_START_LAT, WNMAP_MAP_START_LON); var p2 = new LatLong(lat, lon); var distInKm = LatLong.distHaversine (p1, p2); var distInMiles = distInKm / 1.609344; Modified: trunk/src/web/js/nodemap.js =================================================================== --- trunk/src/web/js/nodemap.js 2006-04-09 22:19:46 UTC (rev 36) +++ trunk/src/web/js/nodemap.js 2006-04-09 22:24:39 UTC (rev 37) @@ -21,13 +21,13 @@ map.setMapType (G_SATELLITE_TYPE); map.addControl(new GLargeMapControl()); map.addControl (new GMapTypeControl()); - map.centerAndZoom(new GPoint(SWNCFG_MAP_START_LON, SWNCFG_MAP_START_LAT), parseInt(SWNCFG_MAP_START_ZOOM)); + map.centerAndZoom(new GPoint(WNMAP_MAP_START_LON, WNMAP_MAP_START_LAT), parseInt(WNMAP_MAP_START_ZOOM)); map.addControl(new GScaleControl()); map.registerKeyHandlers (window); - // Set default map type to SWNCFG_MAP_START_TYPE + // Set default map type to WNMAP_MAP_START_TYPE var mapTypes = map.getMapTypes(); - map.setMapType(mapTypes[SWNCFG_MAP_START_TYPE]); + map.setMapType(mapTypes[WNMAP_MAP_START_TYPE]); GEvent.addListener (map, 'click', function (overlay, point) { if (!overlay) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |