Authored by Justin R. Miller

fix bug & clarify that only points are supported currently

@@ -92,7 +92,7 @@ typedef enum : NSUInteger { @@ -92,7 +92,7 @@ typedef enum : NSUInteger {
92 * @return An initialized Mapbox tile source. */ 92 * @return An initialized Mapbox tile source. */
93 - (id)initWithTileJSON:(NSString *)tileJSON; 93 - (id)initWithTileJSON:(NSString *)tileJSON;
94 94
95 -/** For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add annotations from [simplestyle](http://mapbox.com/developers/simplestyle/) data. 95 +/** For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add point annotations from [simplestyle](http://mapbox.com/developers/simplestyle/) data.
96 * 96 *
97 * This method requires a network connection in order to download the TileJSON used to define the tile source. 97 * This method requires a network connection in order to download the TileJSON used to define the tile source.
98 * 98 *
@@ -101,7 +101,7 @@ typedef enum : NSUInteger { @@ -101,7 +101,7 @@ typedef enum : NSUInteger {
101 * @return An initialized Mapbox tile source. */ 101 * @return An initialized Mapbox tile source. */
102 - (id)initWithMapID:(NSString *)mapID enablingDataOnMapView:(RMMapView *)mapView; 102 - (id)initWithMapID:(NSString *)mapID enablingDataOnMapView:(RMMapView *)mapView;
103 103
104 -/** For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add annotations from [simplestyle](http://mapbox.com/developers/simplestyle/) data, optionally enabling SSL. 104 +/** For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add point annotations from [simplestyle](http://mapbox.com/developers/simplestyle/) data, optionally enabling SSL.
105 * 105 *
106 * This method requires a network connection in order to download the TileJSON used to define the tile source. 106 * This method requires a network connection in order to download the TileJSON used to define the tile source.
107 * 107 *
@@ -111,13 +111,13 @@ typedef enum : NSUInteger { @@ -111,13 +111,13 @@ typedef enum : NSUInteger {
111 * @return An initialized Mapbox tile source. */ 111 * @return An initialized Mapbox tile source. */
112 - (id)initWithMapID:(NSString *)mapID enablingDataOnMapView:(RMMapView *)mapView enablingSSL:(BOOL)enableSSL; 112 - (id)initWithMapID:(NSString *)mapID enablingDataOnMapView:(RMMapView *)mapView enablingSSL:(BOOL)enableSSL;
113 113
114 -/** For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add annotations from [simplestyle](http://mapbox.com/developers/simplestyle/) data. 114 +/** For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add point annotations from [simplestyle](http://mapbox.com/developers/simplestyle/) data.
115 * @param tileJSON A string containing TileJSON. 115 * @param tileJSON A string containing TileJSON.
116 * @param mapView A map view on which to display the annotations. 116 * @param mapView A map view on which to display the annotations.
117 * @return An initialized Mapbox tile source. */ 117 * @return An initialized Mapbox tile source. */
118 - (id)initWithTileJSON:(NSString *)tileJSON enablingDataOnMapView:(RMMapView *)mapView; 118 - (id)initWithTileJSON:(NSString *)tileJSON enablingDataOnMapView:(RMMapView *)mapView;
119 119
120 -/** For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add annotations from [simplestyle](http://mapbox.com/developers/simplestyle/) data. 120 +/** For TileJSON 2.1.0+ layers, initialize a tile source and automatically find and add point annotations from [simplestyle](http://mapbox.com/developers/simplestyle/) data.
121 * 121 *
122 * Passing a remote URL requires a network connection. If offline functionality is desired, you should cache the TileJSON locally at a prior date, then pass a file path URL to this method. 122 * Passing a remote URL requires a network connection. If offline functionality is desired, you should cache the TileJSON locally at a prior date, then pass a file path URL to this method.
123 * 123 *
@@ -116,6 +116,8 @@ @@ -116,6 +116,8 @@
116 { 116 {
117 for (NSDictionary *feature in jsonObject[@"features"]) 117 for (NSDictionary *feature in jsonObject[@"features"])
118 { 118 {
  119 + if ([feature[@"geometry"][@"type"] isEqualToString:@"Point"])
  120 + {
119 NSDictionary *properties = feature[@"properties"]; 121 NSDictionary *properties = feature[@"properties"];
120 122
121 CLLocationCoordinate2D coordinate = { 123 CLLocationCoordinate2D coordinate = {
@@ -140,6 +142,7 @@ @@ -140,6 +142,7 @@
140 } 142 }
141 } 143 }
142 } 144 }
  145 + }
143 }); 146 });
144 } 147 }
145 } 148 }