diff options
author | Christian Pointner <equinox@ffgraz.net> | 2008-12-05 14:29:57 +0000 |
---|---|---|
committer | Christian Pointner <equinox@ffgraz.net> | 2008-12-05 14:29:57 +0000 |
commit | edc8c8979403479438d9b6ddc47c4f6214ac6538 (patch) | |
tree | b6e158b080aa650a8b56431f28efb30f49d15ffa | |
parent | f47521db9de4b14ab56fc0f86a84407dd07165f2 (diff) |
added makeIcon
-rw-r--r-- | img/marker_blue.png | bin | 0 -> 3237 bytes | |||
-rw-r--r-- | img/marker_darkred.png | bin | 0 -> 3050 bytes | |||
-rw-r--r-- | img/marker_grey.png | bin | 0 -> 3226 bytes | |||
-rw-r--r-- | img/marker_grey_trans.png | bin | 0 -> 493 bytes | |||
-rw-r--r-- | img/marker_large.png | bin | 0 -> 4029 bytes | |||
-rw-r--r-- | img/marker_medium.png | bin | 0 -> 3591 bytes | |||
-rw-r--r-- | img/marker_offline.png | bin | 0 -> 296 bytes | |||
-rw-r--r-- | img/marker_online.png | bin | 0 -> 280 bytes | |||
-rw-r--r-- | img/marker_shadow.png | bin | 0 -> 436 bytes | |||
-rw-r--r-- | img/marker_tunnel.png | bin | 0 -> 285 bytes | |||
-rw-r--r-- | img/marker_white.png | bin | 0 -> 3174 bytes | |||
-rw-r--r-- | img/marker_yellow.png | bin | 0 -> 3206 bytes | |||
-rw-r--r-- | map.js | 25 |
13 files changed, 20 insertions, 5 deletions
diff --git a/img/marker_blue.png b/img/marker_blue.png Binary files differnew file mode 100644 index 0000000..1ec7f8c --- /dev/null +++ b/img/marker_blue.png diff --git a/img/marker_darkred.png b/img/marker_darkred.png Binary files differnew file mode 100644 index 0000000..d5b29d4 --- /dev/null +++ b/img/marker_darkred.png diff --git a/img/marker_grey.png b/img/marker_grey.png Binary files differnew file mode 100644 index 0000000..f74e0be --- /dev/null +++ b/img/marker_grey.png diff --git a/img/marker_grey_trans.png b/img/marker_grey_trans.png Binary files differnew file mode 100644 index 0000000..60f8597 --- /dev/null +++ b/img/marker_grey_trans.png diff --git a/img/marker_large.png b/img/marker_large.png Binary files differnew file mode 100644 index 0000000..d9c1be0 --- /dev/null +++ b/img/marker_large.png diff --git a/img/marker_medium.png b/img/marker_medium.png Binary files differnew file mode 100644 index 0000000..51575d2 --- /dev/null +++ b/img/marker_medium.png diff --git a/img/marker_offline.png b/img/marker_offline.png Binary files differnew file mode 100644 index 0000000..d67f19e --- /dev/null +++ b/img/marker_offline.png diff --git a/img/marker_online.png b/img/marker_online.png Binary files differnew file mode 100644 index 0000000..b6c3a43 --- /dev/null +++ b/img/marker_online.png diff --git a/img/marker_shadow.png b/img/marker_shadow.png Binary files differnew file mode 100644 index 0000000..3a89759 --- /dev/null +++ b/img/marker_shadow.png diff --git a/img/marker_tunnel.png b/img/marker_tunnel.png Binary files differnew file mode 100644 index 0000000..7594826 --- /dev/null +++ b/img/marker_tunnel.png diff --git a/img/marker_white.png b/img/marker_white.png Binary files differnew file mode 100644 index 0000000..2d8e0cc --- /dev/null +++ b/img/marker_white.png diff --git a/img/marker_yellow.png b/img/marker_yellow.png Binary files differnew file mode 100644 index 0000000..7d81cdb --- /dev/null +++ b/img/marker_yellow.png @@ -106,8 +106,25 @@ function addNewNodeText(point) { return html; } +function makeIcon(type) { + var icon = new GIcon(); + + switch(type) { + case 'online': icon.image = "./img/marker_online.png"; break; + case 'tunnel': icon.image = "./img/marker_tunnel.png"; break; + case 'offline': icon.image = "./img/marker_offline.png"; break; + case 'ruler': icon.image = "./img/marker_blue.png"; break; + case 'newnode': icon.image = "./img/marker_darkred.png"; + } + icon.iconSize = new GSize(12,20); + icon.iconAnchor = new GPoint(6,20); + icon.infoWindowAnchor = new GPoint(5,1); + return icon +} + + function setNewMarker(point) { - var marker = new GMarker(point,{draggable: true}); + var marker = new GMarker(point,{icon: makeIcon('newnode'), draggable: true}); GEvent.addListener(marker, "dragstart", function() { this.autoclosed = true; @@ -197,14 +214,12 @@ RulerControl.prototype.initialize = function(map) { } var pnt = map.getCenter(); -// marker1 = new GMarker(pnt, {icon: makeIcon('messen'), draggable: true}); - marker1 = new GMarker(pnt, {draggable: true}); + marker1 = new GMarker(pnt, {icon: makeIcon('ruler'), draggable: true}); marker1.overlaytype = "ruler"; marker1.overlaysubtype = "marker1"; map.addOverlay(marker1); -// marker2 = new GMarker(pnt, {icon: makeIcon('messen'), draggable: true}); - marker2 = new GMarker(pnt, {draggable: true}); + marker2 = new GMarker(pnt, {icon: makeIcon('ruler'), draggable: true}); marker2.overlaytype = "ruler"; marker2.overlaysubtype = "marker2"; map.addOverlay(marker2); |