Skip to content

hoogw/geojson_serialization_googlemap_ios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geojson_serialization_googlemap_ios

Serialize geojson to google map iOS shapes

how to use :

#import <GoogleMaps/GoogleMaps.h>
#import "GeoJSONSerialization.h"

NSData *data;
NSDictionary *geoJSON;
NSArray *shapes;



// add geojson
data = [NSData dataWithContentsOfURL:[[NSBundle mainBundle] URLForResource:@"your_data" withExtension:@"geojson"]];
geoJSON = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
shapes = [GeoJSONSerialization shapesFromGeoJSONFeatureCollection:geoJSON error:nil];


for (GMSOverlay *shape in shapes) {
    shape.map = mapView_;
    
}

About

Serialize geojson to google map iOS shapes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published