Browse Source

1.修改iOS Apex Mobile地图图标。

Pen Li 8 năm trước cách đây
mục cha
commit
789512cdac
25 tập tin đã thay đổi với 168 bổ sung14 xóa
  1. 23 0
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_destination.imageset/Contents.json
  2. BIN
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_destination.imageset/new_location_destination.png
  3. BIN
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_destination.imageset/new_location_destination@2x.png
  4. BIN
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_destination.imageset/new_location_destination@3x.png
  5. 23 0
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_origin.imageset/Contents.json
  6. BIN
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_origin.imageset/new_location_origin.png
  7. BIN
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_origin.imageset/new_location_origin@2x.png
  8. BIN
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_origin.imageset/new_location_origin@3x.png
  9. 23 0
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_pod.imageset/Contents.json
  10. BIN
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_pod.imageset/new_location_pod.png
  11. BIN
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_pod.imageset/new_location_pod@2x.png
  12. BIN
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_pod.imageset/new_location_pod@3x.png
  13. 23 0
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_poe.imageset/Contents.json
  14. BIN
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_poe.imageset/new_location_poe.png
  15. BIN
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_poe.imageset/new_location_poe@2x.png
  16. BIN
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_poe.imageset/new_location_poe@3x.png
  17. 23 0
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_pol.imageset/Contents.json
  18. BIN
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_pol.imageset/new_location_pol.png
  19. BIN
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_pol.imageset/new_location_pol@2x.png
  20. BIN
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_pol.imageset/new_location_pol@3x.png
  21. 23 0
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_por.imageset/Contents.json
  22. BIN
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_por.imageset/new_location_por.png
  23. BIN
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_por.imageset/new_location_por@2x.png
  24. BIN
      Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_por.imageset/new_location_por@3x.png
  25. 30 14
      Apex Mobile/Apex Mobile/ShipMap/AMShipMap.m

+ 23 - 0
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_destination.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "new_location_destination.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "new_location_destination@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "new_location_destination@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_destination.imageset/new_location_destination.png


BIN
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_destination.imageset/new_location_destination@2x.png


BIN
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_destination.imageset/new_location_destination@3x.png


+ 23 - 0
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_origin.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "new_location_origin.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "new_location_origin@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "new_location_origin@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_origin.imageset/new_location_origin.png


BIN
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_origin.imageset/new_location_origin@2x.png


BIN
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_origin.imageset/new_location_origin@3x.png


+ 23 - 0
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_pod.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "new_location_pod.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "new_location_pod@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "new_location_pod@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_pod.imageset/new_location_pod.png


BIN
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_pod.imageset/new_location_pod@2x.png


BIN
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_pod.imageset/new_location_pod@3x.png


+ 23 - 0
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_poe.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "new_location_poe.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "new_location_poe@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "new_location_poe@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_poe.imageset/new_location_poe.png


BIN
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_poe.imageset/new_location_poe@2x.png


BIN
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_poe.imageset/new_location_poe@3x.png


+ 23 - 0
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_pol.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "new_location_pol.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "new_location_pol@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "new_location_pol@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_pol.imageset/new_location_pol.png


BIN
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_pol.imageset/new_location_pol@2x.png


BIN
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_pol.imageset/new_location_pol@3x.png


+ 23 - 0
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_por.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "new_location_por.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "new_location_por@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "new_location_por@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_por.imageset/new_location_por.png


BIN
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_por.imageset/new_location_por@2x.png


BIN
Apex Mobile/Apex Mobile/NewImages.xcassets/new_location_por.imageset/new_location_por@3x.png


+ 30 - 14
Apex Mobile/Apex Mobile/ShipMap/AMShipMap.m

@@ -42,6 +42,7 @@ typedef enum {
     if (location == nil) {
         return;
     }
+    NSString *port = [location valueForKey:@"port"];
     NSString* addr = [location valueForKey:@"addr"];
     NSString* name = [location valueForKey:@"name"];
     NSString *lonStr = [location valueForKey:@"lon"];
@@ -51,13 +52,21 @@ typedef enum {
         double longitude = [lonStr doubleValue];
         double latitude = [latStr doubleValue];
         
+        if (port == nil) {
+            port = @"";
+        }
+        
+        if (addr == nil) {
+            addr = @"";
+        }
+        
         // 创建大头针(标注)的数据模型(此处不创建视图,视图通过MKMapView的委托设置回调方法来生成的)
         AMShipAnnotation *ann = [[AMShipAnnotation alloc] init];
         CLLocationCoordinate2D c2d = CLLocationCoordinate2DMake(latitude, longitude);
         // 指定大头针的经纬度坐标(位置)以及附加的信息
         ann.coordinate = c2d;
         ann.title = name;
-        ann.subtitle = addr;
+        ann.subtitle = [NSString stringWithFormat:@"%@ %@",port,addr];
         ann.priority = priority;
         ann.imageName = imgName;
         
@@ -104,38 +113,45 @@ typedef enum {
     
     // pol,pod,poe,por,origin,destination,current
     if (locationInfo) {
-        NSDictionary *pol = [locationInfo objectForKey:@"pol"];
+        NSMutableDictionary *pol = [[locationInfo objectForKey:@"pol"] mutableCopy];
         if (self.showPol) {
-            [self handleLoaction:pol Priority:AMShipAnnotationPriorityHigh ImageName:@"location_pol"];
+            [pol setObject:@"Port Of Load" forKey:@"port"];
+            [self handleLoaction:pol Priority:AMShipAnnotationPriorityHigh ImageName:@"new_location_pol"];
         }
         
-        NSDictionary *pod = [locationInfo objectForKey:@"pod"];
+        NSMutableDictionary *pod = [[locationInfo objectForKey:@"pod"] mutableCopy];
         if (self.showPod) {
-            [self handleLoaction:pod Priority:AMShipAnnotationPriorityHigh  ImageName:@"location_pod"];
+            [pod setObject:@"Port Of Discharge" forKey:@"port"];
+            [self handleLoaction:pod Priority:AMShipAnnotationPriorityHigh  ImageName:@"new_location_pod"];
         }
         
-        NSDictionary *poe = [locationInfo objectForKey:@"poe"];
+        NSMutableDictionary *poe = [[locationInfo objectForKey:@"poe"] mutableCopy];
         if (self.showPoe) {
-            [self handleLoaction:poe Priority:AMShipAnnotationPriorityLow  ImageName:@"location_poe"];
+            [poe setObject:@"Place Of Deliver" forKey:@"port"];
+            [self handleLoaction:poe Priority:AMShipAnnotationPriorityLow  ImageName:@"new_location_poe"];
         }
         
-        NSDictionary *por = [locationInfo objectForKey:@"por"];
+        NSMutableDictionary *por = [[locationInfo objectForKey:@"por"] mutableCopy];
         if (self.showPor) {
-            [self handleLoaction:por Priority:AMShipAnnotationPriorityLow  ImageName:@"location_por"];
+            [por setObject:@"Place Of Receipt" forKey:@"port"];
+            [self handleLoaction:por Priority:AMShipAnnotationPriorityLow  ImageName:@"new_location_por"];
         }
         
-        NSDictionary *origin = [locationInfo objectForKey:@"origin"];
+        NSMutableDictionary *origin = [[locationInfo objectForKey:@"origin"] mutableCopy];
         if (self.showOrigin) {
-            [self handleLoaction:origin Priority:AMShipAnnotationPriorityLow  ImageName:@"location_origin"];
+            [origin setObject:@"Origin" forKey:@"port"];
+            [self handleLoaction:origin Priority:AMShipAnnotationPriorityLow  ImageName:@"new_location_origin"];
         }
         
-        NSDictionary *destination = [locationInfo objectForKey:@"destination"];
+        NSMutableDictionary *destination = [[locationInfo objectForKey:@"destination"] mutableCopy];
         if (self.showDestination) {
-            [self handleLoaction:destination Priority:AMShipAnnotationPriorityLow  ImageName:@"location_destination"];
+            [destination setObject:@"Destination" forKey:@"port"];
+            [self handleLoaction:destination Priority:AMShipAnnotationPriorityLow  ImageName:@"new_location_destination"];
         }
         
-        NSDictionary *current = [locationInfo objectForKey:@"current"];
+        NSMutableDictionary *current = [[locationInfo objectForKey:@"current"] mutableCopy];
         if (self.showCurrent) {
+            [current setObject:@"Current" forKey:@"port"];
             [self handleLoaction:current Priority:AMShipAnnotationPriorityRequired  ImageName:@"ic_marker"];
         }
         [self moveToLocation:current];