fix portal-names plugin to work with placeholder portals
This commit is contained in:
@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user