diff --git a/code/map_data_render.js b/code/map_data_render.js index 57abf462..d3811a15 100644 --- a/code/map_data_render.js +++ b/code/map_data_render.js @@ -267,6 +267,17 @@ window.Render.prototype.createPlaceholderPortalEntity = function(guid,latE6,lngE ] ]; + // placeholder portals don't have a useful timestamp value - so the standard code that checks for updated + // portal details doesn't apply + // so, check that the basic details are valid and delete the existing portal if out of date + if (guid in window.portals) { + var p = window.portals[guid]; + if (team != p.options.data.team || latE6 != p.options.data.latE6 || lngE6 != p.options.data.lngE6) { + // team or location have changed - delete existing portal + this.deletePortalEntity(guid); + } + } + this.createPortalEntity(ent); }