Created
June 13, 2013 13:54
-
-
Save jatorre/5773850 to your computer and use it in GitHub Desktop.
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
LineStyle lineStyle = LineStyle.builder().setWidth(0.05f).setColor(Color.WHITE).build(); | |
PolygonStyle polygonStyle = PolygonStyle.builder().setColor(0xFFFF6600 & 0x80FFFFFF).setLineStyle(lineStyle).build(); | |
StyleSet<PolygonStyle> polygonStyleSet = new StyleSet<PolygonStyle>(polygonStyle); | |
// note the SQL has special string !bbox! as bounding box dynamic value placeholder | |
String sql = "SELECT name,iso2,pop2005,area,the_geom_webmercator FROM tm_world_borders WHERE the_geom_webmercator && ST_SetSRID('BOX3D(!bbox!)'::box3d, 3857) LIMIT 3000"; | |
CartoDbVectorLayer cartoLayer = new CartoDbVectorLayer(new EPSG3857(), "nutiteq", sql, null, null, polygonStyleSet); | |
mapView.getLayers().addLayer(cartoLayer); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment