From bf945e174cd61cc2710d46fe38de2ea463b3c416 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Thu, 31 Jul 2014 18:51:29 +0100 Subject: [PATCH] artifacts: a guess as to what's needed for the up-coming 'helios' artifacts --- code/artifact.js | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/code/artifact.js b/code/artifact.js index 2424c521..2442e4cf 100644 --- a/code/artifact.js +++ b/code/artifact.js @@ -145,7 +145,8 @@ window.artifact.isArtifact = function(type) { window.artifact.getArtifactDescriptions = function(type) { var descriptions = { 'jarvis': { 'title': "Jarvis Shards", 'fragmentName': "shards" }, - 'amar': { 'title': "Amar Artifacts", 'fragmentName': "artifacts" } + 'amar': { 'title': "Amar Artifacts", 'fragmentName': "artifacts" }, + 'helios': { 'title': "Helios Artifacts", 'fragmentName': "artifacts" }, }; return descriptions[type]; @@ -223,6 +224,23 @@ window.artifact.updateLayer = function() { } + // 2014-07-28 - another guess, for the upcoming 'helios' artifacts + if (data.helios) { + if (data.helios.target) { + // target portal - show the target marker. use the count of fragments at the target to pick the right icon - it has segments that fill up + + var count = data.helios.fragments ? data.helios.fragments.length : 0; + + iconUrl = '//commondatastorage.googleapis.com/ingress.com/img/map_icons/marker_images/helios_shard_target_'+count+'.png'; + iconSize = 100/2; // 100 pixels - half that size works better + } else if (data.helios.fragments) { + iconUrl = '//commondatastorage.googleapis.com/ingress.com/img/map_icons/marker_images/helios_shard.png'; + iconSize = 60/2; // 60 pixels - half that size works better + opacity = 0.6; // these often hide portals - let's make them semi transparent + } + + } + if (iconUrl) { var icon = L.icon({ iconUrl: iconUrl, @@ -243,12 +261,8 @@ window.artifact.updateLayer = function() { window.artifact.showArtifactList = function() { - - var html = ''; - var typeNames = { 'jarvis': 'Jarvis Shards', 'amar': 'Amar Artifacts' }; - if (Object.keys(artifact.artifactTypes).length == 0) { html += 'No artifacts at this time'; }