mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Node map kinda working
This commit is contained in:
parent
0919c209ac
commit
951ecec688
4 changed files with 40 additions and 11 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>SchemeUserState</key>
|
||||
<dict>
|
||||
<key>MeshtasticClient.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue