cleanup example

This commit is contained in:
rsudekum
2015-07-29 09:54:23 -07:00
parent e4fe525b81
commit b593541ba1
2 changed files with 13 additions and 7 deletions
+1 -2
View File
@@ -338,12 +338,11 @@ RCT_EXPORT_MODULE();
UIImage *image = nil;
if ([url hasPrefix:@"image!"]) {
NSString* localImagePath = [url substringFromIndex:6]; //image!myImage.jpg
NSString* localImagePath = [url substringFromIndex:6];
image = [UIImage imageNamed:localImagePath];
} else {
image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:url]]];
}
UIGraphicsBeginImageContextWithOptions(imageSize, NO, 0.0);
[image drawInRect:CGRectMake(0, 0, imageSize.width, imageSize.height)];
+12 -5
View File
@@ -26,20 +26,27 @@ var Example = React.createClass({
title: 'This is marker 1',
subtitle: 'It has a rightCalloutAccessory too',
rightCalloutAccessory: {
url: 'http://png-3.findicons.com/files/icons/2799/flat_icons/256/gear.png',
url: 'https://cldup.com/9Lp0EaBw5s.png',
height: 25,
width: 25
}
},
annotationImage: {
url: 'https://cldup.com/CnRLZem9k9.png',
height: 25,
width: 25
},
id: 'marker1'
},{
latitude: 40.714541341726175,
longitude: -74.00579452514648,
title: 'Important!',
subtitle: 'Neat, this is a custon annotation image',
subtitle: 'Neat, this is a custom annotation image',
annotationImage: {
url: 'https://avatars3.githubusercontent.com/u/600935?v=3&s=84',
url: 'https://cldup.com/7NLZklp8zS.png',
height: 25,
width: 25
}
},
id: 'marker2'
}]
};
},