I've had a look at the UR-MP code. As suggested above by Twister-UK, the problem is pretty simple. If a scanned block gives 500 results - the maximum the servers will return - the code subdivides that block into 4 and re-scans. This is a great idea - it lets you scan the map in big chunks and only have to "zoom in" where there are a lot of results.
However, it all falls over if the 500+ results are at a single point, as they are here. The code keeps zooming in but will never get fewer results. Whilst I realise this situation is rare - and probably the result of a Waze mistake - it does happen. This is at least the third time UR-MP has hit this problem in the UK.
Having examined the code, I've also managed to code in a boundary condition that will stop the scan getting stuck. I'm already running a modified version because I incorporated a change someone else suggested a while back to allow filtering on all existing MP types. So I can't provide precise line numbers, but this chunk of code should appear around line 6640:
- Code: Select all
WMEURMPT.scanAreaBoundsList.shift();
if (MPs != null) {
if (MPs.hasOwnProperty("error") && MPs.error == 1 ) {
WMEURMPT.log("Found " + MPs.logMessage.length + " " + MPs.logMessage.obj + ". This is a waze server limit. Enqueuing sub tile...");
if ( Math.abs(tileBounds.right - tileBounds.left) > 0.01 ) { //THIS LINE ADDED BY IAINHOUSE
var newTileBounds = new OpenLayers.Bounds;
newTileBounds.extend(new OpenLayers.LonLat(tileBounds.left, tileBounds.bottom));
newTileBounds.extend(new OpenLayers.LonLat((tileBounds.left + tileBounds.right) / 2.0, (tileBounds.bottom + tileBounds.top) / 2.0));
WMEURMPT.scanAreaBoundsList.unshift(newTileBounds);
newTileBounds = new OpenLayers.Bounds;
newTileBounds.extend(new OpenLayers.LonLat((tileBounds.left + tileBounds.right) / 2.0, tileBounds.bottom));
newTileBounds.extend(new OpenLayers.LonLat(tileBounds.right, (tileBounds.bottom + tileBounds.top) / 2.0));
WMEURMPT.scanAreaBoundsList.unshift(newTileBounds);
newTileBounds = new OpenLayers.Bounds;
newTileBounds.extend(new OpenLayers.LonLat(tileBounds.left, (tileBounds.bottom + tileBounds.top) / 2.0));
newTileBounds.extend(new OpenLayers.LonLat((tileBounds.left + tileBounds.right) / 2.0, tileBounds.top));
WMEURMPT.scanAreaBoundsList.unshift(newTileBounds);
newTileBounds = new OpenLayers.Bounds;
newTileBounds.extend(new OpenLayers.LonLat((tileBounds.left + tileBounds.right) / 2.0, (tileBounds.bottom + tileBounds.top) / 2.0));
newTileBounds.extend(new OpenLayers.LonLat(tileBounds.right, tileBounds.top));
WMEURMPT.scanAreaBoundsList.unshift(newTileBounds);
WMEURMPT.scanAreaBoundsCount += 4;
} //THIS LINE ADDED BY IAINHOUSE
} else {
WMEURMPT.log("Found: " + (MPs.hasOwnProperty("mapUpdateRequests") ? MPs.mapUpdateRequests.objects.length + " URs; " : "") + (MPs.hasOwnProperty("problems") ? MPs.problems.objects.length + " MPs; " : "") + (MPs.hasOwnProperty("mapComments") ? MPs.mapComments.objects.length + " MCs; " : "") + (MPs.hasOwnProperty("venues") ? MPs.venues.objects.length + " PURs" : ""));
WMEURMPT.updateURList(MPs);
WMEURMPT.updateMPList(MPs);
WMEURMPT.updateMCList(MPs);
WMEURMPT.updatePURList(MPs);
WMEURMPT.removeOldURMP(MPs.area, MPs.filterType, MPs.tile);
}
}
I've "wrapped" a chunk of that code with an
if statement - the two additional lines have
//THIS LINE ADDED BY IAINHOUSE tacked on the end of them. I've just chosen an arbitrary cut off after the original tile has been sub-divided 6 times.
Hopefully this will help those of you facing problems at the moment, until the script itself can be updated.
