This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| whirlyviz://display? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| whirlyviz://display?name=Chicago Zip Codes&basemap=http://a.tiles.mapbox.com/v3/examples.map-zq0f1vuc.json&vecwidth=4.0&veccolor=8B0000AA&vecfilled=no&geojson=https://raw.github.com/smartchicago/chicago-atlas/master/db/import/zipcodes.geojson&vecfilled=yes&veccolor=8B000066&geojson=https://raw.github.com/smartchicago/chicago-atlas/master/db/import/zipcodes.geojson&clearcolor=82CAFAFF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "queries": [ | |
| { | |
| "name": "main_query", | |
| "display name": "Stats By Country", | |
| "styles": ["outline_style","loft_style"], | |
| "query": "http://mousebird.cartodb.com/api/v2/sql?format=GeoJSON&q=SELECT ne_110m_admin_0_map_units.the_geom,(0.1*(une_measurements.measurement-({{data_set_min}}))/({{data_set_max}}-({{data_set_min}}))+0.01) as height, une_measurements.measurement as measurement,((une_measurements.measurement-({{data_set_min}}))/({{data_set_max}}-({{data_set_min}}))) as color_ramp, ne_110m_admin_0_map_units.name FROM ne_110m_admin_0_map_units inner join une_nations on ne_110m_admin_0_map_units.adm0_a3 = une_nations.iso3 inner join une_measurements on une_nations.id = une_measurements.nation_id WHERE ST_Intersects(ne_110m_admin_0_map_units.the_geom,ST_SetSRID(ST_Point({{taplon}},{{taplat}}),4326)) AND une_measurements.data_set_id = {{data_set}}" | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Style name="landuselow" filter-mode="first" > | |
| <Rule> | |
| <MaxScaleDenominator>3000000</MaxScaleDenominator> | |
| <MinScaleDenominator>750000</MinScaleDenominator> | |
| <Filter>([AREA] > 1000000000) and ([TYPE] = 'water')</Filter> | |
| <PolygonSymbolizer fill="#c4dff6" /> | |
| </Rule> | |
| </Style> | |
| <Layer name="landuselow" | |
| srs="+proj=longlat +ellps=WGS84 +no_defs"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This knows how read and set up vector tiles | |
| MaplyVectorTiles *vecTiles = | |
| [[MaplyVectorTiles alloc] initWithDatabase:filePath viewC:baseViewC]; | |
| // This knows how to page data in | |
| MaplyQuadPagingLayer *layer = | |
| [[MaplyQuadPagingLayer alloc] | |
| initWithCoordSystem:[[MaplySphericalMercator alloc] initWebStandard] | |
| delegate:vecTiles]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| whirlyviz://script?js=http://foo.bar.com/myscript.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Polluting the global name space with spherical mercator extents | |
| var xMin = -20037508.34; | |
| var yMin = -20037508.34; | |
| var xMax = 20037508.34; | |
| var yMax = 20037508.34; | |
| var xSpan = xMax - xMin; | |
| var ySpan = yMax - yMin; | |
| // Current center of the queries | |
| var centerLon = -75.20896911621094; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSString *tileCacheDir = [NSString stringWithFormat:@"%@/%@",self.home.appCacheDir,cacheName]; | |
| [MaplyVectorTiles StartRemoteVectorTiles:tileURL cacheDir:tileCacheDir viewC:self.home.baseViewC block: | |
| ^(MaplyVectorTiles *vecTiles) | |
| { | |
| if (vecTiles) | |
| { | |
| MaplyQuadPagingLayer *layer = [[MaplyQuadPagingLayer alloc] | |
| initWithCoordSystem:[[MaplySphericalMercator alloc] initWebStandard] | |
| delegate:vecTiles]; | |
| layer.numSimultaneousFetches = 8; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Test a ground overlay-like thing | |
| { | |
| UIImage *imgImage = [[UIImage alloc] | |
| initWithData:[NSData dataWithContentsOfURL: | |
| [NSURL URLWithString:@"http://radar.weather.gov/ridge/RadarImg/N0Z/MUX_N0Z_0.gif"]]]; | |
| MaplySticker *mstick = [[MaplySticker alloc] init]; | |
| mstick.image = imgImage; | |
| mstick.ll = MaplyCoordinateMakeWithDegrees(-126.253365, 33.147724); | |
| mstick.ur = MaplyCoordinateMakeWithDegrees(-117.526093, 41.147724); | |
| [theViewC addStickers:@[mstick] desc:nil]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSData *styleData = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"MapzenGLStyle" ofType:@"json"]]; | |
| thisCacheDir = [NSString stringWithFormat:@"%@/mapzen-vectiles",cacheDir]; | |
| MapzenSource *mzSource = [[MapzenSource alloc] | |
| initWithBase:@"http://vector.mapzen.com/osm" | |
| layers:@[@"all"] | |
| // Note: Go get your own API key | |
| apiKey:@"vector-tiles-05s8a-0" | |
| sourceType:MapzenSourcePBF | |
| styleData:styleData |