fix portal-names plugin to work with placeholder portals

This commit is contained in:
Jon Atkins
2015-06-28 20:29:13 +01:00
parent 00b546cb98
commit bf795e7520

View File

@ -2,7 +2,7 @@
// @id iitc-plugin-portal-names@zaso // @id iitc-plugin-portal-names@zaso
// @name IITC plugin: Portal Names // @name IITC plugin: Portal Names
// @category Layer // @category Layer
// @version 0.1.5.@@DATETIMEVERSION@@ // @version 0.1.6.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@ // @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@ // @downloadURL @@DOWNLOADURL@@
@ -93,7 +93,7 @@ window.plugin.portalNames.updatePortalLabels = function() {
for (var guid in window.portals) { for (var guid in window.portals) {
var p = window.portals[guid]; var p = window.portals[guid];
if (p._map) { // only consider portals added to the map if (p._map && p.options.data.title) { // only consider portals added to the map and with a title
var point = map.project(p.getLatLng()); var point = map.project(p.getLatLng());
portalPoints[guid] = point; portalPoints[guid] = point;
} }