README.md in ProMotion-map-0.6.0 vs README.md in ProMotion-map-0.7.0
- old
+ new
@@ -27,17 +27,19 @@
[{
longitude: -82.965972900391,
latitude: 35.090648651123,
title: "Rainbow Falls",
subtitle: "Nantahala National Forest",
- action: :show_forest
+ action: :show_forest,
+ pin_color: :green
},{
longitude: -82.966093558105,
latitude: 35.092520895652,
title: "Turtleback Falls",
subtitle: "Nantahala National Forest",
- action: :show_forest
+ action: :show_forest,
+ pin_color: MKPinAnnotationColorPurple
},{
longitude: -82.95916,
latitude: 35.07496,
title: "Windy Falls",
action: :show_forest
@@ -99,10 +101,11 @@
coordinate: CLLocationCoordinate2DMake(35.085548421623, -82.956244328014)
title: "Stairway Falls", # REQUIRED
subtitle: "Gorges State Park",
image: "my_custom_image",
+ pin_color: :red, # Defaults to :red. Other options are :green or :purple or any MKPinAnnotationColor
left_accessory: my_button,
right_accessory: my_other_button,
action: :my_action, # Overrides :right_accessory
action_button_type: UIButtonTypeContactAdd # Defaults to UIButtonTypeDetailDisclosure
}
@@ -300,9 +303,31 @@
def pin_added(notification)
# Once the pin is dropped we want to select it
select_annotation_at(0)
end
+end
+```
+
+---
+
+### Delegate callbacks
+
+These methods (if implemented in your `MapScreen`) will be called when the corresponding `MKMapViewDelegate` method is invoked:
+
+```ruby
+def will_change_region(animated)
+ # Do something when the region will change
+ # The animated parameter is optional so you can also define it is simply:
+ # def will_change_region
+ # end
+end
+
+def on_change_region(animated)
+ # Do something when the region changed
+ # The animated parameter is optional so you can also define it is simply:
+ # def on_change_region
+ # end
end
```
---