diff --git a/Musgravite.xcworkspace/xcuserdata/Luna.xcuserdatad/UserInterfaceState.xcuserstate b/Musgravite.xcworkspace/xcuserdata/Luna.xcuserdatad/UserInterfaceState.xcuserstate index 381f512..6eeb218 100644 Binary files a/Musgravite.xcworkspace/xcuserdata/Luna.xcuserdatad/UserInterfaceState.xcuserstate and b/Musgravite.xcworkspace/xcuserdata/Luna.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Musgravite.xcworkspace/xcuserdata/Luna.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Musgravite.xcworkspace/xcuserdata/Luna.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index e855642..79f6512 100644 --- a/Musgravite.xcworkspace/xcuserdata/Luna.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/Musgravite.xcworkspace/xcuserdata/Luna.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -10,7 +10,7 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "Musgravite/Controller/DetailViewController.swift" - timestampString = "564864561.821962" + timestampString = "564866494.833429" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" startingLineNumber = "195" @@ -42,7 +42,7 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "Musgravite/Controller/DetailViewController.swift" - timestampString = "564864561.822165" + timestampString = "564866494.8340271" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" startingLineNumber = "196" diff --git a/Musgravite/Controller/DetailViewController.swift b/Musgravite/Controller/DetailViewController.swift index 2f815c0..8a8d7bc 100644 --- a/Musgravite/Controller/DetailViewController.swift +++ b/Musgravite/Controller/DetailViewController.swift @@ -82,7 +82,7 @@ class DetailViewController: UIViewController, UICollectionViewDelegate, UICollec func displayMapDirections(){ let sourceCoordinates = locationManager.location?.coordinate - let destinationCoordinates = CLLocationCoordinate2D(latitude: 19.2833333, longitude: -99.1352777777779) + let destinationCoordinates = CLLocationCoordinate2D(latitude: (labInformation?["coordinates"].arrayValue[0].doubleValue)!, longitude: (labInformation?["coordinates"].arrayValue[1].doubleValue)!) let sourcePlacemark = MKPlacemark(coordinate: sourceCoordinates!) let destinationPlacemark = MKPlacemark(coordinate: destinationCoordinates) let sourceItem = MKMapItem(placemark: sourcePlacemark) @@ -116,7 +116,7 @@ class DetailViewController: UIViewController, UICollectionViewDelegate, UICollec @IBAction func sendToAppleMaps(_ sender: Any) { let sourceCoordinates = locationManager.location?.coordinate - let destinationCoordinates = CLLocationCoordinate2D(latitude: 19.2833333, longitude: -99.1352777777779) + let destinationCoordinates = CLLocationCoordinate2D(latitude: (labInformation?["coordinates"].arrayValue[0].doubleValue)!, longitude: (labInformation?["coordinates"].arrayValue[1].doubleValue)!) let directionsURL = "http://maps.apple.com/?saddr=\(sourceCoordinates?.latitude ?? 0),\(sourceCoordinates?.longitude ?? 0)&daddr=\(destinationCoordinates.latitude),\(destinationCoordinates.longitude)" guard let url = URL(string: directionsURL) else { return diff --git a/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json b/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json index f84499b..aefef29 100644 --- a/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json +++ b/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json @@ -5,10 +5,20 @@ "scale" : "2x", "screen-width" : "<=145" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "scale" : "2x", "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" } ], "info" : { diff --git a/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json b/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json index f84499b..aefef29 100644 --- a/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json +++ b/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json @@ -5,10 +5,20 @@ "scale" : "2x", "screen-width" : "<=145" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "scale" : "2x", "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" } ], "info" : { diff --git a/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json b/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json index f84499b..aefef29 100644 --- a/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json +++ b/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json @@ -5,10 +5,20 @@ "scale" : "2x", "screen-width" : "<=145" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "scale" : "2x", "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" } ], "info" : { diff --git a/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json b/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json index f84499b..aefef29 100644 --- a/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json +++ b/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json @@ -5,10 +5,20 @@ "scale" : "2x", "screen-width" : "<=145" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "scale" : "2x", "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" } ], "info" : { diff --git a/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json b/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json index f84499b..aefef29 100644 --- a/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json +++ b/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json @@ -5,10 +5,20 @@ "scale" : "2x", "screen-width" : "<=145" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "scale" : "2x", "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" } ], "info" : { diff --git a/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json b/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json index f84499b..aefef29 100644 --- a/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json +++ b/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json @@ -5,10 +5,20 @@ "scale" : "2x", "screen-width" : "<=145" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "scale" : "2x", "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" } ], "info" : { diff --git a/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json b/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json index f84499b..aefef29 100644 --- a/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json +++ b/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json @@ -5,10 +5,20 @@ "scale" : "2x", "screen-width" : "<=145" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "scale" : "2x", "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" } ], "info" : { diff --git a/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json b/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json index f84499b..aefef29 100644 --- a/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json +++ b/WMusgravite Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json @@ -5,10 +5,20 @@ "scale" : "2x", "screen-width" : "<=145" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "scale" : "2x", "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" } ], "info" : { diff --git a/WMusgravite Extension/Controller/DetailInterfaceController.swift b/WMusgravite Extension/Controller/DetailInterfaceController.swift index b09e5c7..25d1078 100644 --- a/WMusgravite Extension/Controller/DetailInterfaceController.swift +++ b/WMusgravite Extension/Controller/DetailInterfaceController.swift @@ -51,7 +51,7 @@ class DetailInterfaceController: WKInterfaceController { labLocationOutlet.setText(lab.ubicacion) floorLocationOutlet.setText("Piso \(lab.piso)") /* Map */ - let tec=CLLocationCoordinate2D(latitude: 19.283996, longitude: -99.136006) + let tec = CLLocationCoordinate2D(latitude: lab.x, longitude: lab.y) let region=MKCoordinateRegion(center:tec, span: MKCoordinateSpan(latitudeDelta: 0.005, longitudeDelta: 0.005)) mapOutlet.setRegion(region) mapOutlet.addAnnotation(tec, with: .purple) diff --git a/WMusgravite Extension/Controller/LabInterfaceController.swift b/WMusgravite Extension/Controller/LabInterfaceController.swift index 93a6e7e..ed4d13c 100644 --- a/WMusgravite Extension/Controller/LabInterfaceController.swift +++ b/WMusgravite Extension/Controller/LabInterfaceController.swift @@ -47,7 +47,9 @@ class LabInterfaceController: WKInterfaceController { ubicacion: l["ubicacion"].stringValue, piso: l["piso"].stringValue, trayectoria: l["trayectoria"].stringValue, - posterImage: l["posterImage"].stringValue + posterImage: l["posterImage"].stringValue, + x : l["coordinates"].arrayValue[0].doubleValue, + y : l["coordinates"].arrayValue[1].doubleValue ) self.rLabs.append(model) } diff --git a/WMusgravite Extension/Controller/WaitInterfaceController.swift b/WMusgravite Extension/Controller/WaitInterfaceController.swift index b84a08f..b80aa83 100644 --- a/WMusgravite Extension/Controller/WaitInterfaceController.swift +++ b/WMusgravite Extension/Controller/WaitInterfaceController.swift @@ -47,7 +47,9 @@ class WaitInterfaceController: WKInterfaceController, WCSessionDelegate{ ubicacion: l["ubicacion"].stringValue, piso: l["piso"].stringValue, trayectoria: l["trayectoria"].stringValue, - posterImage: l["posterImage"].stringValue + posterImage: l["posterImage"].stringValue, + x : l["coordinates"].arrayValue[0].doubleValue, + y : l["coordinates"].arrayValue[1].doubleValue ) pushController(withName: "DetailInterfaceController", context: model) } catch let error { diff --git a/WMusgravite Extension/LabData.swift b/WMusgravite Extension/LabData.swift index f67897c..b794499 100644 --- a/WMusgravite Extension/LabData.swift +++ b/WMusgravite Extension/LabData.swift @@ -16,4 +16,6 @@ struct LabData { let piso:String let trayectoria:String let posterImage:String + let x:Double + let y:Double }