-
Notifications
You must be signed in to change notification settings - Fork 225
Auto refreshing cache #521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…o-cache-refresh # Conflicts: # sdkproject/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Response.cs # sdkproject/Assets/Mapbox/Main.unity # sdkproject/Assets/Mapbox/Unity/Utilities/HTTPRequest.cs
…o-cache-refresh # Conflicts: # sdkproject/Assets/Mapbox/Core/mapbox-sdk-cs/Utils/UnixTimestampUtils.cs
@BergWerkGIS I tried the steps you posted on slack and it worked as you said. So I saw tile appear, disappear and reload with new data. I couldn't test it any other way though, so let me know if you want me to try anything else. |
…ich pools objects)
@BergWerkGIS |
…ing-experiments * commit '0ceb39815363646170bd8bc2e54c1ca64d45fb47': MBTilesCache: Windows fix for path and filenames with +260 chars fix Unity's bytecode stripping with IL2CPP discarding "ystem.Linq.Expressions.Expression" Auto refreshing cache (#521) Editor layer key fix (#506) Create PRODUCT_ROADMAP.md change MapId to Style URL in Map Image Editor (#536) Zoomable map scaling fix (#527) Add EditorConfig to enforce coding style (#508) [publish docs] [publish-docs] Remove redundant content (#494) Adding some clarification for inline documentation. Magnifier icon fix (#497) PreBuild script fix for Unity >= 2018.1 Fix MapMatching and Decompression tests (#504) # Conflicts: # sdkproject/Assets/Mapbox/Unity/Map/QuadTreeTileProvider.cs
…elopment * commit '9455db58e622c893563d03ac5bc7507655983bf1': more checks if access token is set (#564) Uv mapping (#503) Layer Visualizer for Building Ids (#502) Add code comments for LatitudeLongitudeToTileId change. (#573) Added a API call to query height Fix compile error related to return type. (#572) add QueryTerrainHeight function to AbstractMap (#571) appveyor: don't use PowerShell to download docfx Integrate mapbox-ar-unity (#544) Enable loading external configurations - take 2 (#552) update PR template MBTilesCache: Windows fix for path and filenames with +260 chars fix Unity's bytecode stripping with IL2CPP discarding "ystem.Linq.Expressions.Expression" Auto refreshing cache (#521) Editor layer key fix (#506) Create PRODUCT_ROADMAP.md change MapId to Style URL in Map Image Editor (#536) Zoomable map scaling fix (#527) Add EditorConfig to enforce coding style (#508) # Conflicts: # sdkproject/Assets/Mapbox/Examples/4_VectorTileMaps/BasicUvMap/AtlasInfo.asset # sdkproject/Assets/Mapbox/Examples/4_VectorTileMaps/BasicUvMap/AtlasInfo.asset.meta # sdkproject/Assets/Mapbox/Examples/4_VectorTileMaps/BasicUvMap/BasicUvMap.unity # sdkproject/Assets/Mapbox/Examples/4_VectorTileMaps/BasicUvMap/TextureSideWallModifier.asset # sdkproject/Assets/Mapbox/Examples/4_VectorTileMaps/BasicUvMap/UvMapVisualizer.asset # sdkproject/Assets/Mapbox/Examples/4_VectorTileMaps/BasicUvMap/UvVectorTileFactory.asset # sdkproject/Assets/Mapbox/Examples/_sharedModules/TransparentGreyPolygonStack.asset # sdkproject/Assets/Mapbox/Unity/MeshGeneration/Data/AtlasInfo.cs # sdkproject/Assets/Mapbox/Unity/MeshGeneration/Modifiers/TextureSideWallModifier.cs # sdkproject/ProjectSettings/ProjectVersion.txt
* More plumbing + Unified Map interface. * add new texture from random google images * Image & elevation layer refactor + some UI work. * Add EditorConfig to enforce coding style (#508) * add inital version of .editorconfig * EditorConfig: add trim_trailing_whitespace * add info about EditorConfig to CHANGELOG * add info about EditorConfig to CODING-STYLE.md * PoGo related prefab work. * UI for Layer properties. * Zoomable map scaling fix (#527) * Fix scaling issue when converting geo <=> world position. * Fix typo. * Fixes issue where bounds were wrong on rotating camera. #511 * change MapId to Style URL in Map Image Editor (#536) * add roof uv & atlas support * Create PRODUCT_ROADMAP.md * test textures for styling development * add missing constant Vector3Right * fix materials in mat modifier * fix atlas info object * Editor layer key fix (#506) * fix a bug where layer visualizer keys wasn't saved property when set through vector tile factory editor * fix the name it uses to find key property * remove property field for "state" property * Auto refreshing cache (#521) * [wip] autorefreshing cache * implement actual tile request when cache tile is outdated * auto-migrate old caches (add etag and lastmodified columns) * TileJSON objects for API wrapper * tests for TileJSON wrapper * MBTilesCache: implement 'force update' * TileJSON tests: test for 'Name' property being not empty * TileJSONResponse: add inlince docs about which properties can be empty * add test scene * fix MBTilesCache exception when automigrating cache when no cached existed at all * add inline docs to CachingWebFileSource * add custom tileset to test scene * expose menuitem to delete all existing cache files * add 'Updated' property to HttpResponse and Tile * VectorTileFactory: on update call delete gameobjects * additional null checks * TODO remove!!! scene and asset changes for testing * own POI visualizer for test tileset * expose auto-refreshing-cache option in the settings * change tile factory from destroying object to unregistering tiles (which pools objects) * delete test scene * Vector Data work + UI * fix Unity's bytecode stripping with IL2CPP discarding "ystem.Linq.Expressions.Expression" * Base polygon vector layer rendering hookup * MBTilesCache: Windows fix for path and filenames with +260 chars (cherry picked from commit f6fdd6e) * Add snap terrain modifier, UI cleanup. * UnifiedMapOptions for serialization + UI cleanup * FIlters Setup + UI. * Filters hookup. * Latest scene before pulling develop in . * Removed unused properties from shader * Hookup active property for VectorLayerVisualizers * Fix to properly show Mesh & GO modifiers in the UI * Add UI for removing/combining filters * Break classes into separate files, remove MapAPI wrapper. UnifiedMap takes over the functionality. Fix bug with filters * Add new prefabs for LocationBasedGame and CitySim * Fixes loadingPanel script to work with UnifiedMap * Trigger finished state when no vector layer is turned off. * Fix mapId for Satellite & satellite-streets * update PR template * Update UI to match design - round 1 * Add new data containers * Enable loading external configurations - take 2 (#552) * carry over changes from #352 to latest develop * Fix the merge typo. * Integrate mapbox-ar-unity (#544) * add ARCore, ARKit, UnityARInterface * Mapbox AR code and examples * add KalmanFilter * some updated metas * fix .gitignore to not ignore parts of ARCore * add AR prefabs * fix .gitignore for .metas from temp files from docs generation * add additional properties to `Location` * add helper class for onscreen console * [wip] integrate AR * more logging for caching * MBTilesCache: Windows fix for path and filenames with +260 chars * add some logging to AbstractMap.cs * add editorconfig * debug messages around telem lib initialization * ARTableTop: test in Vienna * ProjectSettings: enable AR on Android * remove Debug messages * fix typo in TelemetryAndroid.cs file name * add layers needed for AR demo to the project settings * fix Unity's byte stripping for .Net 4.6 and IL2CPP * throw out uncessary stuff that comes with UnityARInterface and ARCore * update readme, add AR readme. * update CHANGELOG * wip integrate ar * Throw away unused ARKit stuff. * Update prefabs & scene * Add defaults options + linewidth parameter. * Add mockup for Presets UI * Adding tooltips for General, Image & Terrain sections. * Fix extra space in Terrain UI. * [WIP] Remove old map files, rename UnifiedMap to AbstractMap - working towards clean merge. * [WIP] Replace old VectorTileFactory with refactored ( VectorTileFactoryNew gets renamed) * add kalman comment * appveyor: don't use PowerShell to download docfx * Fix typo in terrain source. * New textures/materials for default building style * Merge StyleOptimizedVectorTileFactory functionality into VectorTileFactory * Updated settings to TextureSideWall * VectorLayerVisualizer refactor. * Hookup node editor with Plug & play refactor. * Add tooltips for vector section. * Add missing changes to VectorTIle.cs * add QueryTerrainHeight function to AbstractMap (#571) Looks good. * try with GPS position/heading, ignoring AR and bias * Fix compile error related to return type. (#572) minor change. * Added a API call to query height Added a API call on AbstractMap to query height at a certain latitude longitude. * Add preset defaults switching + snapMaptoZero hookup. * Changes to MapEditor. * Add code comments for LatitudeLongitudeToTileId change. (#573) * Fix compile error related to return type. * update code comments * Layer Visualizer for Building Ids (#502) * change VectorFeatureUnity and VectorLayerVisualizer classes to support buildings ids and do not render duplicates of same featuer from different tiles * add comments for an if clause in VectorFeatureUnity * Uv mapping (#503) * add uv mapping height modifier and a demo scene to show it off * fix TextureSideWallModifier to respect min_height property * fix a bug in wall segment calculation in TextureSideWallModifier where CenterSegment feature yielded long first sections fix a bug in PolygonModifier where it doesn't create tangents fix wrong asset bindings * fix an issue where TextureSideWallModifier doesn't take atlas section height into consideration * add a 8 building texture atlas * add new texture from random google images * fix a bug where bottomOfMidUv was calculated wrong * Fix formatting. * Add atlas texturing modifier into Plug & play UI. * Remove presets from map * work on DeviceLocationProvider, AutomaticSyncScene: size of player shows hdop, remove some debug statements * Add parameters to hookup Globe terrain factory. * Mapbox styles - MapboxStyles shader for layer colorization, AtlasTemplateGenerator for creating template images from AtlasInfo files, various scripts for assisting with building colorization. * Set defaults for all properties * Add API calls for layers * Renamed AddColorizeMapboxStyles.cs to MapboxStylesColorModifier.cs to better match existing nomenclature. Refactored MapboxStylesColorModifier.cs: Run method no longer adds ColorizeMapboxStyles.cs monobehaviour to VectorEntity.GameObject; Run method now includes all logic for color selection and material property setting previously found in ColorizeMapboxStyles.cs; utilizes VectorEntity's cached MeshRenderer component to set colors. Deleted ColorizeMapboxStyles.cs and ColorizeMapboxStylesEditor.cs. * Add custom option to primitive type - for fully custom modifier stack. * Hook up scriptable palette with P&P * Add code comments to Abstract Map. * Cleanup unused stuff. * Fixed private field naming to meet code style requirements. * Fix indentation * Adds ability to add custom tile providers. * more checks if access token is set (#564) * Style development - colorization and atlas template generator (#579) * add uv mapping height modifier and a demo scene to show it off * fix TextureSideWallModifier to respect min_height property * fix a bug in wall segment calculation in TextureSideWallModifier where CenterSegment feature yielded long first sections fix a bug in PolygonModifier where it doesn't create tangents fix wrong asset bindings * fix an issue where TextureSideWallModifier doesn't take atlas section height into consideration * change VectorFeatureUnity and VectorLayerVisualizer classes to support buildings ids and do not render duplicates of same featuer from different tiles * add comments for an if clause in VectorFeatureUnity * add a 8 building texture atlas * add new texture from random google images * add roof uv & atlas support * test textures for styling development * add missing constant Vector3Right * fix materials in mat modifier * fix atlas info object * Removed unused properties from shader * New textures/materials for default building style * Updated settings to TextureSideWall * Mapbox styles - MapboxStyles shader for layer colorization, AtlasTemplateGenerator for creating template images from AtlasInfo files, various scripts for assisting with building colorization. * Renamed AddColorizeMapboxStyles.cs to MapboxStylesColorModifier.cs to better match existing nomenclature. Refactored MapboxStylesColorModifier.cs: Run method no longer adds ColorizeMapboxStyles.cs monobehaviour to VectorEntity.GameObject; Run method now includes all logic for color selection and material property setting previously found in ColorizeMapboxStyles.cs; utilizes VectorEntity's cached MeshRenderer component to set colors. Deleted ColorizeMapboxStyles.cs and ColorizeMapboxStylesEditor.cs. * Fixed private field naming to meet code style requirements. * Fix indentation * log GPS timestamp once more * Cleanup + update prefabs & UI. * Fixes atlas textures bug, UI bug and creates city sim prefab with textured buildings. * Add building Id tileset as default, fix minor issues. * Update map prefab with default style * Fix to trigger finished state on VectorTileFactory. * Add loading texture, build locationProvider example , fix bug with imagery init. * Update Camera script to work with new map, LocationBasedGame prefab uses camerabounds by default. * Code cleanup - move drawers into their own files. * Code Cleanup. Arrange files into folders. * Foldouts don't forget what they were told to do ;) * Fixed null ref error on MapboxStylesColorModifier; class now null checks m_scriptablePalette on Initialize and Run, and returns if object is null. Cleanup up names in Scriptable Palette Editor to make inspector look slightly cleaner. * Update ARTabletop scene. * updated Clip/Box shader (#580) * updated shader * fix indentation * fixed indent * Recreate ZoomableMap and Globe with new Plug and Play functionality (#585) * created clip shaders for stylized map * Fix errors from meta files. * Add TabletopARkit prefab. * fix missing tangents bug. * Set Relative height = false as default. * Fix issue with final state not being triggered when image factory was disabled. * add UniAndroidPermission * DeviceLocationProvider: request runtime location permissions on Android * add class to open settings for app on Android * update AutoSyncScene * fix AutoSyncScene and WorldAlignmentKit prefab * increase desired accuracy * increase desired accuracy * hopefully getting there * Prefab block for configuration window * update worldalignmentprefab * Merge explorer and interactive styled map examples. * images updated * layout, changelog link * Update WorldAlignmentKit prefab + fix reload script to use "update" function. * ar example scene names * Updated `Explorer` scene. * Updated worlsAlignmentKit * Updated working AR scene. * Fix double map initialize issue. * remove extra example scenes * fix merge conflict: PropertyDrawers.meta * prefab body text * update TabletopAR image * Possible fix for worldScale AR * Add namespace for ObjectPool + change Awake to start in Position with LocationProvider * WIP manual sync AR scene * fix broken WorldAlignmentKit.prefab after merge * make debug paths thicker * Add missing namespaces. * Missing namespace. * Manual World Alignment scene and prefab * fix broken meta file * Update scenes. * Update version to 1.4.0 * Scene cleanup - delete old examples * Fix wrong unwrapped tile id * Possible fix for Configuration window `NullReference` * remove Android pre-build checks for duplicate libraries (#574) * WorldAlignmentKit prefab: remove layer 'Map' from culling mask of Main Camera * move UniAndroidPermission to PlugIns folder * add sub-assets in scenelists via editor (#586) * Moved editor files to Assets/Mapbox/Unity/Editor * Delete moved files - Atlas Generator & scriptable Palette UI * Added Mapbox.Editor namespace, converted spaces to tabs. * Fix compile errors related to meta files. * Cleanup tooltip text. * Fix Warnings. * Update scenes. * Cleanup warnings - pass 2. * Cleanup warnings pass 3. * Update ScenesList.cs * Fix typecast error on filters + filter Pois labels based on localRank. * Add Update method to RangeTileProvider. * Update PathHelpers.cs * Change explorer to Data Explorer, clean unused assets. * fix duplicate buildings in WorldScaleAR-ManualAlignment * silence remaining warnings * Fix screenshot name for explorer, add initialization to elevationLayerProperties as a defensive fix. * Fix typo * Fix build error, turn vector layer off for Globe example, Add build settings. * Config window 1.4 (#587) * add sub-assets in scenelists via editor * assign default value to MapboxConfiguration's token status * Change camera for city simulator scene. * fix RasterTileExample * fix VoxelMap * Fix finished status not getting fired event for globe example. * silence another warning and remove unused using * make TileErrorHandler work with new AbstractMap * Fixes for RC3 * Renamed TabletopARKit prefab to ARTableTop * Turn off initializeOnStart for LocationBasedGame prefab. * Defensive fix for crash on iOS. * Fix for missing features - Add property in vectorsublayerproperties to clip features at tile boundary. * Change scene & prefab with clip at tile boundary setting. * Fix NRE's on inspectors for scriptable objects in sharedmodules. * Remove new from LocationProvider prefab name in LocationBasedGame prefab * Asset file cleanup * Trigger finished status for tiles that error out. * Fix flat terrain factory editor. * remove inital wait for GPS on DeviceLocationProvider start. Implement 'IsLocationServiceEnabled' property on 'Location' and send one Location event when location services are not enabled or failed to start in time. * Fix issue with prefab modifier where removing the `IFeaturePropertySettable` was not setting transforms for prefabs. * Make Modifiers & map selectable from node editor, change mismatching button style. * add 'IsLocationServiceInitializing' to 'Location.cs'. Expose that info in the LocationBasedGame scene * Add all layers from explorer v130 example (most layers turned off) * Make foldouts static. * Update scenelist. * move misplaced `link.xml` into MapboxAR subfolder * Remove interaction from DataExplorer scene, Added a new scene for interaction. * Turn buildings on in Data Explorer :) * Scale the canvas to fit the screen. * Change zoomSpeed = 0, merge building layers. * Update formatting of playground scenes, enable camera for data explorer. * Tweaks to scenes for performance & formatting. * Finally turn on the camera movement script on DataExplorer * Fix scaling in y for map & unity tile. Add script to keep camera above terrain for zoomable map. * Update buildingswithUniqueIds property. * Add prerequisite info for AR scenes. * work around crashes on iOS with escaped characters in the URL * Fix height data query. * Add missing using UnityEngine. * Update example descriptions * Disable SetCameraHeight script + add method to query height in unity units. * Update zoomable map scene to not have setCameraHeight * Remove replacing text with latlong for geocode response. * Fix formatting * Remove DirectionsQuery * Update project version * Add event system to CitySimulator scene + filter mouse events on search UI. * Format main scene UI. * another fix for URL encoding for iOS * Update changelog
fix #261
Updates ambient caching to not only request tiles when the cache has reached its maximum size but also automatically check in the background if a newer version of already locally cached tiles is available.
Also adds a new item to the
Mapbox
menu to delete all existing cache files not just the one of the current scene.TODO:
Mapbox -> Setup
to toggle that behaviour withdefault:OFF
MapboxAccess.ClearCache()
for backwards compatibility but mark it as deprecatedAs part of the process of submitting this PR, please: