Does Apple Maps use Core Graphics internally?
Solution 1:
Yes, Core Graphics – also known as Quartz 2D – is fast enough to render a map.
To prove the potential, find a vector representation of a map encoded as a PDF file. Using Preview.app, view the map. PDF rendering on Apple's operating systems uses Core Graphics.
Core Graphics
The Core Graphics framework is based on the Quartz advanced drawing engine. It provides low-level, lightweight 2D rendering with unmatched output fidelity. You use this framework to handle path-based drawing, transformations, color management, offscreen rendering, patterns, gradients and shadings, image data management, image creation, and image masking, as well as PDF document creation, display, and parsing.
You can prove Maps.app on macOS uses Core Graphics using the nm
tool:
nm -m /Applications/Maps.app/Contents/MacOS/Maps | grep CG
The output shows numerous calls to Core Graphics:
(undefined) external _CGAffineTransformEqualToTransform (from CoreGraphics)
(undefined) external _CGAffineTransformIdentity (from CoreGraphics)
(undefined) external _CGAffineTransformInvert (from CoreGraphics)
(undefined) external _CGAffineTransformMakeRotation (from CoreGraphics)
You can see Maps.app is linked against the QuartzCore and CoreGraphics frameworks with otool
:
otool -L /Applications/Maps.app/Contents/MacOS/Maps