Closed peterhambly closed 5 years ago
I will refactor the code as suggested.
I thought this was ready to merge. Surprised you're still adding to it. What's the status?
I am still making suggest changes; will ask for a further review.
Are you finished with this, Peter? Can we merge it?
Have added error traps for PNG tile loading errors. Have also set maxNativeZoom: 11
to avoid: Error code is 'INVALID_ZOOM_FACTOR'. Message list is: '12 is an invalid zoom factor. It must be a number in [0,11].
middleware errors. If a PNG tile for zoomlevel 10 or 11 is required it is generated on the fly. This make not complete in time and this will generate and error. The user is warned that this has occurred and to try again in one minute. Ideally this should not occur as the TileLayer should handle this with a longer timeout and re-tries; e.g: https://jsfiddle.net/rendrom/0bef9r7z/
Now ready to merge into master. Will merge at the same time as pull #135
PNG Tile Generation
Adds the ability to use tiles instead of GeoJSON in the front end, Currently only integrated to the when load a large area study from a JSON file.
The tiles generation has highlighted a bug in the UK geography in the Scottish highlands - I needed to clean the data to remove some spurious lines and points. This patch just effects graphics generation - tiles and the shapefiles.
For geolevels with more than 5000 areas the RIF middleware can auto generate PNG tiles on startup. If you do not do this the tiles will be generated on the fly; this can take up to 60 seconds per tile for the most complex tiles with >200,000 areas. Tiles are then cached.
To rebuild the cache delete the tiles scratchSpace directory: c:\rifDemo\scratchSpace\scratchSpace\tiles\ For UK 2011 census geography this typically takes 10 to 20 minutes. You need to edit the conf directory RIFServiceStartupProperties.properties:
This processing requires 7G of memory; edit %CATALINA_HOME%/bin/setenv.bat to add -Xmx7g to CATALINA_OPTS:
Code has been upgraded to Javadoc standards