changeset 131:f28f58045270 gmap2

Cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 09 Mar 2014 13:04:49 +0200
parents a2dab3b3d8e6
children ace4060171e8
files icons.js
diffstat 1 files changed, 16 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/icons.js	Sun Mar 09 13:03:11 2014 +0200
+++ b/icons.js	Sun Mar 09 13:04:49 2014 +0200
@@ -1,25 +1,26 @@
 // $Id: icons.js 2150 2009-05-29 02:03:34Z jeskko $
-var icon = new GIcon();
-icon.iconSize = new GSize(32,32);
-icon.shadowSize = new GSize(56,32);
-icon.iconAnchor = new GPoint(16,16);
-icon.infoWindowAnchor = new GPoint(16,16); 
+var iconBase = new GIcon();
+iconBase.iconSize = new GSize(32,32);
+iconBase.shadowSize = new GSize(56,32);
+iconBase.iconAnchor = new GPoint(16,16);
+iconBase.infoWindowAnchor = new GPoint(16,16); 
 
 
-function getGIcon(name)
+function createIcon(name)
 {
 //  var iconBaseURL = "http://maps.google.com/mapfiles/kml/";
   var iconBaseURL = "http://maps.google.com/mapfiles/ms/micons/";
-  return new GIcon(icon, iconBaseURL+name+".png", iconBaseURL+name+"s.png");
+  return new GIcon(iconBase, iconBaseURL+name+".png", iconBaseURL+name+"s.png");
 }
 
+
 var icons = [];
 
-icons["default"]    = getGIcon("orange-dot");
-icons["ferry"]      = getGIcon("purple-dot");
-icons["tradelane"]  = getGIcon("pink");
-icons["guild"]      = getGIcon("green-dot");
-icons["pcity"]      = getGIcon("blue");
-icons["city"]       = getGIcon("red-dot");
-icons["ss"]         = getGIcon("icon14");
-icons["shrine"]     = getGIcon("icon11");
+icons["default"]    = createIcon("orange-dot");
+icons["ferry"]      = createIcon("purple-dot");
+icons["tradelane"]  = createIcon("pink");
+icons["guild"]      = createIcon("green-dot");
+icons["pcity"]      = createIcon("blue");
+icons["city"]       = createIcon("red-dot");
+icons["ss"]         = createIcon("icon14");
+icons["shrine"]     = createIcon("icon11");