diff --git a/Meshtastic Client.xcodeproj/project.pbxproj b/Meshtastic Client.xcodeproj/project.pbxproj index af7c9c5e..ae67097f 100644 --- a/Meshtastic Client.xcodeproj/project.pbxproj +++ b/Meshtastic Client.xcodeproj/project.pbxproj @@ -683,7 +683,7 @@ CODE_SIGN_ENTITLEMENTS = MeshtasticClient/MeshtasticClient.entitlements; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_ASSET_PATHS = "\"MeshtasticClient/Preview Content\""; - DEVELOPMENT_TEAM = GCH7VS5Y9R; + DEVELOPMENT_TEAM = 37C534H572; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = MeshtasticClient/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; @@ -710,7 +710,7 @@ CODE_SIGN_ENTITLEMENTS = MeshtasticClient/MeshtasticClient.entitlements; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_ASSET_PATHS = "\"MeshtasticClient/Preview Content\""; - DEVELOPMENT_TEAM = GCH7VS5Y9R; + DEVELOPMENT_TEAM = 37C534H572; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = MeshtasticClient/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; diff --git a/Meshtastic Client.xcodeproj/project.xcworkspace/xcuserdata/joshuapirihi.xcuserdatad/UserInterfaceState.xcuserstate b/Meshtastic Client.xcodeproj/project.xcworkspace/xcuserdata/joshuapirihi.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 00000000..0cf93559 Binary files /dev/null and b/Meshtastic Client.xcodeproj/project.xcworkspace/xcuserdata/joshuapirihi.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Meshtastic Client.xcodeproj/xcuserdata/joshuapirihi.xcuserdatad/xcschemes/xcschememanagement.plist b/Meshtastic Client.xcodeproj/xcuserdata/joshuapirihi.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 00000000..f0e83da9 --- /dev/null +++ b/Meshtastic Client.xcodeproj/xcuserdata/joshuapirihi.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + MeshtasticClient.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/MeshtasticClient/Views/Nodes/NodeMap.swift b/MeshtasticClient/Views/Nodes/NodeMap.swift index c3aee386..9a76385d 100644 --- a/MeshtasticClient/Views/Nodes/NodeMap.swift +++ b/MeshtasticClient/Views/Nodes/NodeMap.swift @@ -36,23 +36,38 @@ struct NodeMap: View { set: { _ in } ) + /*ForEach ( locationNodes ) { node in + let mostRecent = node.positions?.lastObject as! PositionEntity + if mostRecent.coordinate != nil { + + annotations.append(MapLocation(name: node.user?.shortName! ?? "???", coordinate: mostRecent.coordinate!)) + + } + }*/ + NavigationView { ZStack { + + Map(coordinateRegion: regionBinding, interactionModes: [.all], showsUserLocation: true, - userTrackingMode: .constant(.follow)//, - //ForEach ( locationNodes ) { node in - // let mostRecent = node.positions?.lastObject as! PositionEntity - // if mostRecent.coordinate != nil { + userTrackingMode: .constant(.follow), + annotationItems: self.locationNodes.filter({ nodeinfo in + return nodeinfo.positions != nil && nodeinfo.positions!.count > 0 + }) + ) { locationNode in - // annotations.append(MapLocation(name: node.user?.shortName! ?? "???", coordinate: mostRecent.coordinate!)) - - // } - // } - ) + return MapAnnotation( + coordinate: (locationNode.positions!.lastObject as! PositionEntity).coordinate ?? CLLocationCoordinate2D(latitude: 0, longitude: 0), + content: { + CircleText(text: locationNode.user!.shortName ?? "???", color: .accentColor) + } + ) + + } //} .frame(maxHeight: .infinity) .ignoresSafeArea(.all, edges: [.leading, .trailing])