HTML5 Canvas Map Rendering DOM Complexity
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional methods for rendering maps on computing devices often result in complex DOM hierarchies and performance issues due to the use of multiple individual image-related elements, which can hinder smooth map interactions like zooming and panning.
Innovation Solution
The use of canvas elements in HTML5 to render maps, allowing for a simpler DOM hierarchy and efficient map interactions by populating a second canvas with a new view while hiding a portion of the first canvas, enabling functions such as zooming, panning, and moving the map center point.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of information
If multiple individual image-related DOM elements are used to render maps, then detailed map information can be displayed, but the DOM hierarchy becomes complex and performance deteriorates
Solution Approach 1:
The patent merges multiple individual image-related DOM elements into a single canvas element. This consolidation maintains the ability to display detailed map information while dramatically simplifying the DOM hierarchy, reducing it from potentially hundreds of individual elements to just one canvas element with associated layers.
Solution Approach 2:
The canvas element serves as a universal container that can display multiple map layers, markers, and geographic information simultaneously. This multi-functional approach replaces the need for separate DOM elements for each map component, simplifying the overall structure while maintaining information completeness.
2Adaptability or versatility
If multiple individual image-related DOM elements are used to render maps, then comprehensive map features can be implemented, but interaction smoothness deteriorates
Solution Approach 1:
By combining multiple map features and layers into a single canvas element, the patent reduces the computational overhead associated with manipulating numerous individual DOM elements. This merging enables smoother interactions such as zooming, panning, and rotating operations while maintaining comprehensive map functionality.
Solution Approach 2:
The canvas element provides a dynamic rendering surface that can efficiently handle real-time map transformations. The unified canvas structure allows for optimized rendering pipelines and smoother transitions during user interactions compared to the static, element-by-element manipulation required by traditional DOM-based approaches.
3Device complexity
If canvas elements are used to render maps, then DOM hierarchy complexity is reduced, but compatibility with conventional rendering methods may be compromised
Solution Approach 1:
The canvas element serves as a universal rendering surface that can display various map types and styles. It maintains compatibility with conventional rendering methods by supporting multiple map layers, markers, and geographic information formats, while simultaneously providing the DOM simplification benefits of canvas-based rendering.
Solution Approach 2:
The canvas element acts as an intermediary between the simplified DOM structure and the complex rendering requirements. It bridges the gap between the need for simple DOM hierarchy and the requirement for comprehensive map rendering capabilities, allowing developers to work with a simplified structure while achieving full rendering functionality.
Data Source
AI summary
The disclosure generally describes computer-implemented methods, software, and systems for rendering maps using canvasses. One method includes: presenting a portion of a first map in a first canvas of a user interface; receiving a user input to perform a function associated with changing a display presentation of the first map; populating a second canvas with a second map associated with the first map; exposing at least a portion of the second canvas; and hiding at least a portion of the first canvas.


