Use queryPointAnnotations to drive annotation view updates - Get sets of visible and offscreen annotations using the mbgl query mechanism and updates and enqueues as required - Query viewport adjusted if tilted (avoid apparent issue with queryPointAnnotations when the query box is larger than the actual viewport) - Add a small debugging display in iOS app to see annotations going in and out of the reuse queue This also works around a performance issue that made getting an annotation context expensive by implementing a map of annotations to tags. It works around another issue with the underlying mbgl query so that even if it (rarely) returns an incorrect result, the correct visual effect still occurs and the reuse queue is added to and drained as expected. Finally, this refactors MGLMapView viewForAnnotation: to use the maps to access the requested annotation context and view. This avoids a more expensive lookup done previously. Along for the ride: sync up the ios and macos names (and types) for MGLAnnotationTagContextMap
208 lines
18 KiB
XML
208 lines
18 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="PSe-Ot-7Ff">
|
|
<dependencies>
|
|
<deployment identifier="iOS"/>
|
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
|
|
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
|
<capability name="Navigation items with more than one left or right bar item" minToolsVersion="7.0"/>
|
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
|
</dependencies>
|
|
<scenes>
|
|
<!--Map View Controller-->
|
|
<scene sceneID="p0T-1N-kQ6">
|
|
<objects>
|
|
<viewController id="WaX-pd-UZQ" userLabel="Map View Controller" customClass="MBXViewController" sceneMemberID="viewController">
|
|
<layoutGuides>
|
|
<viewControllerLayoutGuide type="top" id="f0q-9O-L15"/>
|
|
<viewControllerLayoutGuide type="bottom" id="m8o-i7-QIy"/>
|
|
</layoutGuides>
|
|
<view key="view" contentMode="scaleToFill" id="Z9X-fc-PUC">
|
|
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
<subviews>
|
|
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kNe-zV-9ha" customClass="MGLMapView">
|
|
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
|
<gestureRecognizers/>
|
|
<connections>
|
|
<outlet property="delegate" destination="WaX-pd-UZQ" id="za0-3B-qR6"/>
|
|
<outletCollection property="gestureRecognizers" destination="lfd-mn-7en" appends="YES" id="0PH-gH-GRm"/>
|
|
</connections>
|
|
</view>
|
|
<label opaque="NO" userInteractionEnabled="NO" alpha="0.69999999999999996" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="58y-pX-YyB">
|
|
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
|
<constraints>
|
|
<constraint firstAttribute="width" constant="180" id="OL2-l5-I2f"/>
|
|
<constraint firstAttribute="height" constant="21" id="xHg-ye-wzT"/>
|
|
</constraints>
|
|
<fontDescription key="fontDescription" type="system" pointSize="8"/>
|
|
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
|
<nil key="highlightedColor"/>
|
|
</label>
|
|
</subviews>
|
|
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
|
<constraints>
|
|
<constraint firstItem="kNe-zV-9ha" firstAttribute="leading" secondItem="Z9X-fc-PUC" secondAttribute="leading" id="53e-Tz-QxF"/>
|
|
<constraint firstItem="kNe-zV-9ha" firstAttribute="bottom" secondItem="m8o-i7-QIy" secondAttribute="top" id="Etp-BC-E1N"/>
|
|
<constraint firstAttribute="trailing" secondItem="kNe-zV-9ha" secondAttribute="trailing" id="MGr-8G-VEb"/>
|
|
<constraint firstItem="58y-pX-YyB" firstAttribute="trailing" secondItem="Z9X-fc-PUC" secondAttribute="trailingMargin" id="O3a-bR-boI"/>
|
|
<constraint firstItem="m8o-i7-QIy" firstAttribute="top" secondItem="58y-pX-YyB" secondAttribute="bottom" constant="20" id="cjh-ZS-Mv4"/>
|
|
<constraint firstItem="kNe-zV-9ha" firstAttribute="top" secondItem="Z9X-fc-PUC" secondAttribute="top" id="qMm-e9-jxH"/>
|
|
</constraints>
|
|
</view>
|
|
<navigationItem key="navigationItem" id="p8W-eP-el5">
|
|
<nil key="title"/>
|
|
<barButtonItem key="leftBarButtonItem" image="settings.png" id="Jw8-JP-CaZ" userLabel="Map Settings">
|
|
<userDefinedRuntimeAttributes>
|
|
<userDefinedRuntimeAttribute type="string" keyPath="accessibilityLabel" value="Map settings"/>
|
|
</userDefinedRuntimeAttributes>
|
|
<connections>
|
|
<action selector="showSettings:" destination="WaX-pd-UZQ" id="X2C-Ee-Qvt"/>
|
|
</connections>
|
|
</barButtonItem>
|
|
<button key="titleView" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="KsN-ny-Hou">
|
|
<rect key="frame" x="61" y="7" width="207" height="30"/>
|
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
|
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
|
|
<state key="normal" title="Streets"/>
|
|
<connections>
|
|
<action selector="cycleStyles:" destination="WaX-pd-UZQ" eventType="touchUpInside" id="PnY-mb-J6m"/>
|
|
</connections>
|
|
</button>
|
|
<rightBarButtonItems>
|
|
<barButtonItem image="TrackingLocationOffMask.png" id="CQ1-GP-M6x" userLabel="User Tracking Mode">
|
|
<userDefinedRuntimeAttributes>
|
|
<userDefinedRuntimeAttribute type="string" keyPath="accessibilityLabel" value="User tracking mode"/>
|
|
</userDefinedRuntimeAttributes>
|
|
<connections>
|
|
<action selector="locateUser:" destination="WaX-pd-UZQ" id="XgF-DB-z3f"/>
|
|
</connections>
|
|
</barButtonItem>
|
|
<barButtonItem systemItem="organize" id="5IK-vz-jKQ" userLabel="Offline Packs">
|
|
<userDefinedRuntimeAttributes>
|
|
<userDefinedRuntimeAttribute type="string" keyPath="accessibilityLabel" value="Offline packs"/>
|
|
</userDefinedRuntimeAttributes>
|
|
<connections>
|
|
<segue destination="7q0-lI-zqb" kind="show" identifier="ShowOfflinePacks" id="xjx-0t-0LD"/>
|
|
</connections>
|
|
</barButtonItem>
|
|
</rightBarButtonItems>
|
|
</navigationItem>
|
|
<connections>
|
|
<outlet property="hudLabel" destination="58y-pX-YyB" id="MEh-ir-3IH"/>
|
|
<outlet property="mapView" destination="kNe-zV-9ha" id="VNR-WO-1q4"/>
|
|
</connections>
|
|
</viewController>
|
|
<placeholder placeholderIdentifier="IBFirstResponder" id="AAd-8J-9UU" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
|
<pongPressGestureRecognizer allowableMovement="10" minimumPressDuration="1" id="lfd-mn-7en">
|
|
<connections>
|
|
<action selector="handleLongPress:" destination="WaX-pd-UZQ" id="dkk-bc-rvl"/>
|
|
</connections>
|
|
</pongPressGestureRecognizer>
|
|
</objects>
|
|
<point key="canvasLocation" x="1365.5999999999999" y="349.47526236881561"/>
|
|
</scene>
|
|
<!--Offline Packs-->
|
|
<scene sceneID="xIg-PA-7r3">
|
|
<objects>
|
|
<tableViewController id="7q0-lI-zqb" customClass="MBXOfflinePacksTableViewController" sceneMemberID="viewController">
|
|
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="eeN-6b-zqe">
|
|
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
|
<prototypes>
|
|
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Inactive" editingAccessoryType="detailDisclosureButton" textLabel="JtH-Ce-MI5" detailTextLabel="tTJ-jv-U9v" style="IBUITableViewCellStyleSubtitle" id="fGu-Ys-Eh1">
|
|
<rect key="frame" x="0.0" y="92" width="375" height="44"/>
|
|
<autoresizingMask key="autoresizingMask"/>
|
|
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="fGu-Ys-Eh1" id="sUf-bc-8xG">
|
|
<frame key="frameInset" width="375" height="43.5"/>
|
|
<autoresizingMask key="autoresizingMask"/>
|
|
<subviews>
|
|
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="My Inactive Offline Pack" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="JtH-Ce-MI5">
|
|
<frame key="frameInset" minX="15" minY="6" width="174.5" height="19.5"/>
|
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
|
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
|
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
|
<nil key="highlightedColor"/>
|
|
</label>
|
|
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="456 resources (789 MB)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="tTJ-jv-U9v">
|
|
<frame key="frameInset" minX="15" minY="25.5" width="128" height="13.5"/>
|
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
|
<fontDescription key="fontDescription" type="system" pointSize="11"/>
|
|
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
|
<nil key="highlightedColor"/>
|
|
</label>
|
|
</subviews>
|
|
</tableViewCellContentView>
|
|
</tableViewCell>
|
|
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Active" editingAccessoryType="detailDisclosureButton" textLabel="9ZK-gS-wJ4" detailTextLabel="0xK-p8-Mmh" style="IBUITableViewCellStyleSubtitle" id="mKB-tz-Zfl">
|
|
<rect key="frame" x="0.0" y="136" width="375" height="44"/>
|
|
<autoresizingMask key="autoresizingMask"/>
|
|
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="mKB-tz-Zfl" id="nS3-aU-nBr">
|
|
<frame key="frameInset" width="375" height="43.5"/>
|
|
<autoresizingMask key="autoresizingMask"/>
|
|
<subviews>
|
|
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="My Active Offline Pack" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="9ZK-gS-wJ4">
|
|
<frame key="frameInset" minX="15" minY="6" width="163" height="19.5"/>
|
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
|
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
|
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
|
<nil key="highlightedColor"/>
|
|
</label>
|
|
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Downloading 123 of 456 resources… (789 MB downloaded)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0xK-p8-Mmh">
|
|
<frame key="frameInset" minX="15" minY="25.5" width="310.5" height="13.5"/>
|
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
|
<fontDescription key="fontDescription" type="system" pointSize="11"/>
|
|
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
|
<nil key="highlightedColor"/>
|
|
</label>
|
|
</subviews>
|
|
</tableViewCellContentView>
|
|
</tableViewCell>
|
|
</prototypes>
|
|
<connections>
|
|
<outlet property="dataSource" destination="7q0-lI-zqb" id="oe8-d5-Rjo"/>
|
|
<outlet property="delegate" destination="7q0-lI-zqb" id="D5X-oy-DSc"/>
|
|
</connections>
|
|
</tableView>
|
|
<navigationItem key="navigationItem" title="Offline Packs" id="UcK-PK-eQA">
|
|
<barButtonItem key="rightBarButtonItem" systemItem="add" id="gCV-hl-Mzc">
|
|
<connections>
|
|
<action selector="addCurrentRegion:" destination="7q0-lI-zqb" id="G2O-3V-aEA"/>
|
|
</connections>
|
|
</barButtonItem>
|
|
</navigationItem>
|
|
<connections>
|
|
<segue destination="x2D-ga-sM5" kind="unwind" identifier="ReturnToMap" unwindAction="unwindToMapViewController:" id="6MZ-Ed-tu2"/>
|
|
</connections>
|
|
</tableViewController>
|
|
<placeholder placeholderIdentifier="IBFirstResponder" id="Dga-Vh-IxZ" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
|
<exit id="x2D-ga-sM5" userLabel="Exit" sceneMemberID="exit"/>
|
|
</objects>
|
|
<point key="canvasLocation" x="2075" y="350"/>
|
|
</scene>
|
|
<!--Navigation Controller-->
|
|
<scene sceneID="LFg-oU-zTK">
|
|
<objects>
|
|
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="PSe-Ot-7Ff" sceneMemberID="viewController">
|
|
<toolbarItems/>
|
|
<navigationBar key="navigationBar" contentMode="scaleToFill" id="ONr-CS-J5X">
|
|
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
|
<autoresizingMask key="autoresizingMask"/>
|
|
</navigationBar>
|
|
<nil name="viewControllers"/>
|
|
<connections>
|
|
<segue destination="WaX-pd-UZQ" kind="relationship" relationship="rootViewController" id="lV0-PD-2Ag"/>
|
|
</connections>
|
|
</navigationController>
|
|
<placeholder placeholderIdentifier="IBFirstResponder" id="Lom-R7-kwe" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
|
</objects>
|
|
<point key="canvasLocation" x="554" y="350"/>
|
|
</scene>
|
|
</scenes>
|
|
<resources>
|
|
<image name="TrackingLocationOffMask.png" width="23" height="23"/>
|
|
<image name="settings.png" width="28" height="28"/>
|
|
</resources>
|
|
<color key="tintColor" red="0.12156862745098039" green="0.5490196078431373" blue="0.6705882352941176" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
|
</document>
|