Authored by Justin R. Miller

update RMMarker to use red star pin image by default

... ... @@ -74,34 +74,34 @@ typedef enum {
/** @name Creating Markers Using MapBox Images */
/** Initializes and returns a newly allocated marker object using an empty, gray, medium-sized pin image. */
/** Initializes and returns a newly allocated marker object using a red, medium-sized star pin image. */
- (id)initWithMapBoxMarkerImage;
/** Initializes and returns a newly allocated marker object using a gray, medium-sized pin image and a given symbol name, e.g., `bus`.
/** Initializes and returns a newly allocated marker object using a red, medium-sized pin image and a given symbol name, e.g., `bus`.
* @param symbolName A symbol name from the [Maki](http://mapbox.com/maki/) icon set.
* @return An initialized RMMarker layer. */
- (id)initWithMapBoxMarkerImage:(NSString *)symbolName;
/** Initializes and returns a newly allocated marker object using a medium-sized pin image and a given symbol name, e.g., `bus` and a given color.
/** Initializes and returns a newly allocated marker object using a medium-sized pin image, a given symbol name, e.g., `bus`, and a given color.
* @param symbolName A symbol name from the [Maki](http://mapbox.com/maki/) icon set.
* @param color A color for the marker.
* @return An initialized RMMarker layer. */
- (id)initWithMapBoxMarkerImage:(NSString *)symbolName tintColor:(UIColor *)color;
/** Initializes and returns a newly allocated marker object using a pin image and a given symbol name, e.g., `bus`, a given color, and a given size.
/** Initializes and returns a newly allocated marker object using a pin image, a given symbol name, e.g., `bus`, a given color, and a given size.
* @param symbolName A symbol name from the [Maki](http://mapbox.com/maki/) icon set.
* @param color A color for the marker.
* @param size A size for the marker.
* @return An initialized RMMarker layer. */
- (id)initWithMapBoxMarkerImage:(NSString *)symbolName tintColor:(UIColor *)color size:(RMMarkerMapBoxImageSize)size;
/** Initializes and returns a newly allocated marker object using a medium-sized pin image and a given symbol name, e.g., `bus` and a given HTML hex color, e.g., `ff0000`.
/** Initializes and returns a newly allocated marker object using a medium-sized pin image, a given symbol name, e.g., `bus`, and a given HTML hex color, e.g., `ff0000`.
* @param symbolName A symbol name from the [Maki](http://mapbox.com/maki/) icon set.
* @param colorHex A color for the marker specified as an HTML hex code.
* @return An initialized RMMarker layer. */
- (id)initWithMapBoxMarkerImage:(NSString *)symbolName tintColorHex:(NSString *)colorHex;
/** Initializes and returns a newly allocated marker object using a pin image and a given symbol name, e.g., `bus`, a given HTML hex color, e.g., `ff0000`, and a given size, e.g., `large`.
/** Initializes and returns a newly allocated marker object using a pin image, a given symbol name, e.g., `bus`, a given HTML hex color, e.g., `ff0000`, and a given size, e.g., `large`.
* @param symbolName A symbol name from the [Maki](http://mapbox.com/maki/) icon set.
* @param colorHex A color for the marker specified as an HTML hex code.
* @param sizeString A size such as `small`, `medium`, or `large`.
... ...
... ... @@ -136,8 +136,8 @@
NSURL *imageURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://a.tiles.mapbox.com/v3/marker/pin-%@%@%@%@.png",
(sizeString ? [sizeString substringToIndex:1] : @"m"),
(symbolName ? [@"-" stringByAppendingString:symbolName] : @""),
(colorHex ? [@"+" stringByAppendingString:[colorHex stringByReplacingOccurrencesOfString:@"#" withString:@""]] : @""),
(symbolName ? [@"-" stringByAppendingString:symbolName] : @"-star"),
(colorHex ? [@"+" stringByAppendingString:[colorHex stringByReplacingOccurrencesOfString:@"#" withString:@""]] : @"+ff0000"),
(useRetina ? @"@2x" : @"")]];
UIImage *image;
... ...
... ... @@ -42,7 +42,7 @@
{
if ( ! [super layer])
{
RMMarker *marker = [[[RMMarker alloc] initWithMapBoxMarkerImage:@"star" tintColor:[UIColor redColor]] autorelease];
RMMarker *marker = [[[RMMarker alloc] initWithMapBoxMarkerImage] autorelease];
marker.canShowCallout = YES;
... ...