Skip to content

Commit 1a3d0f2

Browse files
v3.0.3 (#37)
* removed last long string * bumped SDK version
1 parent f9d2e66 commit 1a3d0f2

File tree

6 files changed

+34
-24
lines changed

6 files changed

+34
-24
lines changed

SDK v3 Examples/ios-sdk-app/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ use_frameworks!
44
target 'ios-sdk-app' do
55
project "ios-sdk-app"
66
workspace 'ios-sdk-app'
7-
pod 'MappedIn', '3.0.2'
7+
pod 'MappedIn', '3.0.3'
88
end
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<div style="font-size: 13px; display: flex; align-items: center; justify-content: center;">
2+
<div style="margin: 10px;">{{capitalize type}} {{#if isEntering}}to{{else}}from{{/if}} {{toMapName}}</div>
3+
<div style="width: 40px; height: 40px; border-radius: 50%;background: green; display: flex; align-items: center; margin: 5px; margin-left: 0px; justify-content: center;">
4+
<svg height="16" viewBox="0 0 36 36" width="16">
5+
<g fill="white">{{{icon}}}</g>
6+
</svg>
7+
</div>
8+
</div>

SDK v3 Examples/ios-sdk-app/ios-sdk-app.xcodeproj/project.pbxproj

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
ED9E061F2661582400842DD8 /* ViewController+UIPickerViewDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED9E061E2661582400842DD8 /* ViewController+UIPickerViewDataSource.swift */; };
2020
ED9E06212661587A00842DD8 /* ViewController+UIPickerViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED9E06202661587A00842DD8 /* ViewController+UIPickerViewDelegate.swift */; };
2121
ED9E0623266159DD00842DD8 /* ViewController+MPIMapViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED9E0622266159DD00842DD8 /* ViewController+MPIMapViewDelegate.swift */; };
22-
EDF031A626852B4400E82ED0 /* marker.html in Resources */ = {isa = PBXBuildFile; fileRef = EDF031A526852B4400E82ED0 /* marker.html */; };
22+
EDF031A626852B4400E82ED0 /* connectionTemplate.html in Resources */ = {isa = PBXBuildFile; fileRef = EDF031A526852B4400E82ED0 /* connectionTemplate.html */; };
23+
EDF031AC2686604300E82ED0 /* marker.html in Resources */ = {isa = PBXBuildFile; fileRef = EDF031AB2686604300E82ED0 /* marker.html */; };
2324
/* End PBXBuildFile section */
2425

2526
/* Begin PBXCopyFilesBuildPhase section */
@@ -51,7 +52,8 @@
5152
ED9E061E2661582400842DD8 /* ViewController+UIPickerViewDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ViewController+UIPickerViewDataSource.swift"; sourceTree = "<group>"; };
5253
ED9E06202661587A00842DD8 /* ViewController+UIPickerViewDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ViewController+UIPickerViewDelegate.swift"; sourceTree = "<group>"; };
5354
ED9E0622266159DD00842DD8 /* ViewController+MPIMapViewDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ViewController+MPIMapViewDelegate.swift"; sourceTree = "<group>"; };
54-
EDF031A526852B4400E82ED0 /* marker.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = marker.html; sourceTree = "<group>"; };
55+
EDF031A526852B4400E82ED0 /* connectionTemplate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = connectionTemplate.html; sourceTree = "<group>"; };
56+
EDF031AB2686604300E82ED0 /* marker.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = marker.html; sourceTree = "<group>"; };
5557
EFF64FCFD468B2A45D7B557F /* Pods_ios_sdk_app.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ios_sdk_app.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5658
/* End PBXFileReference section */
5759

@@ -80,7 +82,8 @@
8082
isa = PBXGroup;
8183
children = (
8284
259B3DE1260E64750006DB7F /* mappedin-demo-mall.json */,
83-
EDF031A526852B4400E82ED0 /* marker.html */,
85+
EDF031A526852B4400E82ED0 /* connectionTemplate.html */,
86+
EDF031AB2686604300E82ED0 /* marker.html */,
8487
ECC936172576D17C00035E1A /* ios-sdk-app */,
8588
ECC936162576D17C00035E1A /* Products */,
8689
ECC9362E2576D19B00035E1A /* Frameworks */,
@@ -185,8 +188,9 @@
185188
ECC936252576D17E00035E1A /* LaunchScreen.storyboard in Resources */,
186189
ECC936222576D17E00035E1A /* Assets.xcassets in Resources */,
187190
259B3DE2260E64750006DB7F /* mappedin-demo-mall.json in Resources */,
191+
EDF031AC2686604300E82ED0 /* marker.html in Resources */,
188192
EC23C2AF2577F2EC0067C3F3 /* positions.json in Resources */,
189-
EDF031A626852B4400E82ED0 /* marker.html in Resources */,
193+
EDF031A626852B4400E82ED0 /* connectionTemplate.html in Resources */,
190194
ECC936202576D17C00035E1A /* Main.storyboard in Resources */,
191195
);
192196
runOnlyForDeploymentPostprocessing = 0;

SDK v3 Examples/ios-sdk-app/ios-sdk-app/ViewController+MPIMapViewDelegate.swift

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,14 @@ extension ViewController: MPIMapViewDelegate {
1212

1313
func onBlueDotPositionUpdate(update: MPIBlueDotPositionUpdate) {
1414
// Store a reference of the nearest node to use later when getting directions
15-
print("update: ")
1615
nearestNode = update.nearestNode
1716
updateBlueDotBanner(blueDotPosition: update)
18-
print(update.bearing ?? "")
1917
}
2018

2119
func onBlueDotStateChange(stateChange: MPIBlueDotStateChange) {
22-
print("stateChange: ")
23-
// print(stateChange.name)
24-
print(stateChange.markerVisibility ?? "")
25-
// print(stateChange.reason)
20+
print("Blue Dot State Change: \(stateChange.name) \(String(describing: stateChange.markerVisibility))")
2621
}
2722

28-
2923
func onMapChanged(map: MPIMap) {
3024
mapListView.text = map.name
3125

@@ -47,10 +41,10 @@ extension ViewController: MPIMapViewDelegate {
4741
mapView?.removeMarker(id: markerId)
4842
}
4943
// Add a marker on the polygon being clicked
50-
if let node = (polygon.entrances?[0]) {
44+
if let node = (polygon.entrances?[0]), let markerString = markerString {
5145
let markerId = mapView?.createMarker(
5246
node: node,
53-
contentHtml: "<div style=\"width: 32px; height: 32px;\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 293.334 293.334\"><g fill=\"#010002\"><path d=\"M146.667 0C94.903 0 52.946 41.957 52.946 93.721c0 22.322 7.849 42.789 20.891 58.878 4.204 5.178 11.237 13.331 14.903 18.906 21.109 32.069 48.19 78.643 56.082 116.864 1.354 6.527 2.986 6.641 4.743.212 5.629-20.609 20.228-65.639 50.377-112.757 3.595-5.619 10.884-13.483 15.409-18.379a94.561 94.561 0 0016.154-24.084c5.651-12.086 8.882-25.466 8.882-39.629C240.387 41.962 198.43 0 146.667 0zm0 144.358c-28.892 0-52.313-23.421-52.313-52.313 0-28.887 23.421-52.307 52.313-52.307s52.313 23.421 52.313 52.307c0 28.893-23.421 52.313-52.313 52.313z\"/><circle cx=\"146.667\" cy=\"90.196\" r=\"21.756\"/></g></svg></div>",
47+
contentHtml: markerString,
5448
markerOptions: MPIOptions.Marker(anchor: MPIOptions.MARKER_ANCHOR.TOP)
5549
)
5650
if let markerId = markerId {

SDK v3 Examples/ios-sdk-app/ios-sdk-app/ViewController.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ class ViewController: UIViewController {
2424
var presentMarkerId: String?
2525
var defaultRotation: Double?
2626
var defaultTilt: Double?
27-
lazy var venueDataString: String? = getFileContentFromBundle(forResource: "mappedin-demo-mall", ofType: "json")
28-
lazy var connectionTemplateString: String? = getFileContentFromBundle(forResource: "marker", ofType: "html")
27+
lazy var venueDataString = getFileContentFromBundle(forResource: "mappedin-demo-mall", ofType: "json")
28+
lazy var connectionTemplateString = getFileContentFromBundle(forResource: "connectionTemplate", ofType: "html")
29+
lazy var markerString = getFileContentFromBundle(forResource: "marker", ofType: "html")
2930

3031
override func viewDidLoad() {
3132
super.viewDidLoad()
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
<div style="font-size: 13px; display: flex; align-items: center; justify-content: center;">
2-
<div style="margin: 10px;">{{capitalize type}} {{#if isEntering}}to{{else}}from{{/if}} {{toMapName}}</div>
3-
<div style="width: 40px; height: 40px; border-radius: 50%;background: green; display: flex; align-items: center; margin: 5px; margin-left: 0px; justify-content: center;">
4-
<svg height="16" viewBox="0 0 36 36" width="16">
5-
<g fill="white">{{{icon}}}</g>
6-
</svg>
7-
</div>
8-
</div>
1+
<div style="width: 32px; height: 32px;">
2+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 293.334 293.334">
3+
<g fill="#010002">
4+
<path d="M146.667 0C94.903 0 52.946 41.957 52.946 93.721c0 22.322 7.849 42.789 20.891 58.878 4.204 5.178 11.237 13.331 14.903 18.906 21.109 32.069
5+
48.19 78.643 56.082 116.864 1.354 6.527 2.986 6.641 4.743.212 5.629-20.609 20.228-65.639 50.377-112.757 3.595-5.619 10.884-13.483 15.409-18.379a94.561
6+
94.561 0 0016.154-24.084c5.651-12.086 8.882-25.466 8.882-39.629C240.387 41.962 198.43 0 146.667 0zm0 144.358c-28.892 0-52.313-23.421-52.313-52.313 0-28.887
7+
23.421-52.307 52.313-52.307s52.313 23.421 52.313 52.307c0 28.893-23.421 52.313-52.313 52.313z"/>
8+
<circle cx="146.667" cy="90.196" r="21.756"/>
9+
</g>
10+
</svg>
11+
</div>

0 commit comments

Comments
 (0)