SlideShare uma empresa Scribd logo
1 de 35
Baixar para ler offline
Building Custom Maps for Titanium
with Mapbox and OpenStreetMap
Adam Paxton

tiConf NY 2014

adampaxton@polancomedia.com

github.com/adampax

@adampax
Overview
• Current Mapping Options in Titanium
• Simple Map Styling with Mapbox
• Crazy Map Stuff with TileMill
• Lunch
Ti Maps Today
• Apple Maps

• Supported through Ti API

• iOS Only

• Google Maps

• Supported for Android through
Ti API

• Available for iOS through
Community Modules
Some Limitations
• No custom styling
• No complete offline capability*
• Limited map data options
So what?
pinterest.com/timoa/mobile-ui-maps/
Different?
Really Different?
mapbox.com/tilemill/
So what about offline?
Enter Mapbox
• Map design and hosting company
• Pretty much all tools are open source, many written in
JavaScript, Node.js (we like)
• Leverage existing dev skills to make maps (sound familiar?)
• Design your map with Mapbox editors, host it on Mapbox
with free or paid plan or on your own, display in your app
or site with Mapbox SDKs and libraries.
• Pinterest, Foursquare, Evernote, Github
mapbox.com
Mapbox Features
• Free plan, up through enterprise level
• Mapbox Streets - Powered by OpenStreetMap
• Mapbox Terrain ($)
• Mapbox Satellite ($)
• iOS SDK, Android SDK in development
• Mapbox.js - based on Leaflet
• APIs for geocoding, map markers, direct tile image access, routing
• TileMill
And OpenStreetMap
• “The Wikipedia of maps”
• 1.5 Million editors
• 12 Million miles of roads
• 80 Million Buildings
• Powers Mapbox Streets
• Problem with something on your map? Log on to
openstreetmap.org, fix it, watch it update on your Mapbox map
(and everyone else’s map, too)
mapbox.com/openstreetmap/openstreetmap.org
Other Alternatives
• Online mapping is a big world (h’yuk)
• Other options provide some or most of what we need
• ArcGIS (Esri)
• Nutiteq
• CloudMade
• Mapquest Open
• osmdroid - Android Library
• Route-Me - iOS Library
Simple Example
The Job:
• Design a simple map with Mapbox’s online editor
• Host it on Mapbox
• Display it in our Titanium App
usecloak.com
Mapbox Editor
• Select your colors

• Adjust Hue, Saturation,
Lightness, Alpha

• Save and copy the project ID

• Done
More Mapbox Editor Stuff
• Easy styling
• Terrain and satellite layers
• Draw markers, lines,
polygons
• Import from geojson, kml,
gpx, csv
Add the Map
Alloy Markup

!
<Window id="win" title="TiCloak">!
! <Module id="mapView" module="com.polancomedia.mapbox"
map="yourUserName.234jk2l3j" />!
</Window>!
!
Straight up Titanium

!
var mapbox = require('com.polancomedia.mapbox');!
!
var mapView = mapbox.createView({!
! map: 'yourUserName.234jk2l3j'!
});!
!
win.add(mapView);
https://github.com/adampax/TiCloak
The Titanium-Mapbox Module
• Wrapper for Mapbox iOS SDK
• github.com/adampax/titanium-mapbox
• Also check out:
• github.com/mapbox/mapbox-ios-sdk
• github.com/mapbox/mapbox-android-sdk
• Contribute!
The Titanium-Mapbox Module
• Supports Mapbox hosted and offline maps
• Tile caching
• Annotations, polygons, lines, routes
• More to come
• More styling
• More data
• More offline
Fun Mode
• Desktop map editor
• OS X, Windows, Linux
• Based on Mapnik
• Powered with Node.js
• Open source
• Turns non map people into map people
TileMill
mapbox.com/tilemill/
TileMill Options
• Read GeoJSON, Shapefiles, KML, PostGIS, SQLite, CSV, etc
• Organize the data as layers
• Style layers with CartoCSS
• Export as MBTiles file
• Load locally in the app
• Host on Mapbox, either on it’s own or as a layer of another map
• Or export as PNG, SVG, PDF, Mapnik XML
mapbox.com/tilemill/
A Layer
The Process
Geodata Import Style Export
oklahoma.geojson #oklahoma #oklahoma { … } oklahoma.mbtiles
CartoCSS Styling
• Map styling language for
TileMill

• Looks kind of like CSS

• Supports variables, zoom
level-based styling, applying
multiple styles to a layer

• mapbox.com/tilemill/docs/
manual/carto/
github.com/ajashton/pirate-map
#countries {!
::outline1, ::outline2, ::outline3 {!
line-color: @water;!
line-width: 1;!
line-join: round;!
line-opacity: 0.5;!
line-comp-op: multiply;!
}!
::outline1 { line-smooth: 12; }!
::outline2 { line-smooth: 24; }!
::outline3 { line-smooth: 48; }!
polygon-fill: lighten(@water,10);!
polygon-opacity: 0.6;!
}
MBTiles
• SQLite database, easy to transport
• Store x, y and zoom value of each tile along with a blob
image
• Cut out the redundant tiles (how many images of blue
ocean do we really need?)
mapbox.com/developers/mbtiles/
Before We Export
• Maps are made up of tiles

• We track x and y values of the tile, plus
the zoom (z) level

• z level 0 = Whole world in a single tile

• z level 17 = About a city block

• Each zoom level = 4z tiles

• Entire world at z0 = 1 tile

• Entire world at z17 = bazillion tiles
Zoom 0
mapbox.com/developers/guide/
Zoom 1
Trim Your Map
• Be selective on zoom range

• Trim your map to only export
what you need - a city,
neighborhood, etc.

• Consider only exporting the
layer/zoom level you need, and
apply it to the Mapbox Streets
map
Where are all the streets and buildings and stuff?
• By default, only country
outlines are loaded
• Some public data
available through built-in
Geodata browser
• OSM Data must be
imported manually
• Pretty easy to do with
OSM Bright
OSM Bright
• Tutorial for importing
OSM data into
TileMill
• Script builds TileMill
project with default
carto templates
github.com/mapbox/osm-bright
Import OSM Data using OSM Bright
• Better OSM Bright instructions:
• mapbox.com/tilemill/docs/guides/osm-bright-mac-
quickstart/
• Tips:
• Use Postgresapp and osm2pgsql
• Probably don’t need to download the world. Planet.osm:
400GB
• Use extracts of regions, cities instead
TM2 (development)
• OSM Data built right in! - no
more need to download
extracts

• Uses vector tiles

• Mobile SDK support still a
ways out
github.com/mapbox/tm2
Review
• Use the online Mapbox Editor to easily style street maps
of entire world for your app
• Titanium-Mapbox module
• Use TileMill for advanced styling and data display, and to
export to MBTiles for offline access
• OSM Bright to get up and running quickly with TileMill
and OSM data
Thanks!
Adam Paxton

adampaxton@polancomedia.com

Mais conteúdo relacionado

Mais procurados

DATABASE & WEBGIS - GIS BOOTCAMP
DATABASE & WEBGIS - GIS BOOTCAMPDATABASE & WEBGIS - GIS BOOTCAMP
DATABASE & WEBGIS - GIS BOOTCAMPKevin Ng'eno
 
GeoCamp 2012 - Open Source WebMapping
GeoCamp 2012 - Open Source WebMappingGeoCamp 2012 - Open Source WebMapping
GeoCamp 2012 - Open Source WebMappingHugo Martins
 
Make It Rain with Mapbox GL - Franz Neubert
Make It Rain with Mapbox GL - Franz NeubertMake It Rain with Mapbox GL - Franz Neubert
Make It Rain with Mapbox GL - Franz NeubertFranz Neubert
 
Map box styles in GeoServer and OpenLayers
Map box styles in GeoServer and OpenLayersMap box styles in GeoServer and OpenLayers
Map box styles in GeoServer and OpenLayersJody Garnett
 
Qubism and scala nlp
Qubism and scala nlpQubism and scala nlp
Qubism and scala nlpJerome Banks
 
Azure Inside and Out
Azure Inside and OutAzure Inside and Out
Azure Inside and OutEnrique Lima
 
Open source web-gis packages, geoserver-rest and pySLD
Open source web-gis packages, geoserver-rest and pySLDOpen source web-gis packages, geoserver-rest and pySLD
Open source web-gis packages, geoserver-rest and pySLDTek Kshetri
 
Web gis implementation notes
Web gis implementation notesWeb gis implementation notes
Web gis implementation notespaoloverri
 
Geonode introduction
Geonode introductionGeonode introduction
Geonode introductionTek Kshetri
 
AtlasCT - Atlas Mobile Maps API for iOS
AtlasCT - Atlas Mobile Maps API for iOSAtlasCT - Atlas Mobile Maps API for iOS
AtlasCT - Atlas Mobile Maps API for iOSYogev Triki
 
Data Visualization
Data VisualizationData Visualization
Data Visualizationgzargary
 
Cloud Computing and HTML5, 2010
Cloud Computing and HTML5, 2010Cloud Computing and HTML5, 2010
Cloud Computing and HTML5, 2010Moullet
 
Living Content - Smart Data - Esri UK Annual Conference 2017
Living Content - Smart Data - Esri UK Annual Conference 2017Living Content - Smart Data - Esri UK Annual Conference 2017
Living Content - Smart Data - Esri UK Annual Conference 2017Esri UK
 

Mais procurados (19)

DATABASE & WEBGIS - GIS BOOTCAMP
DATABASE & WEBGIS - GIS BOOTCAMPDATABASE & WEBGIS - GIS BOOTCAMP
DATABASE & WEBGIS - GIS BOOTCAMP
 
GeoCamp 2012 - Open Source WebMapping
GeoCamp 2012 - Open Source WebMappingGeoCamp 2012 - Open Source WebMapping
GeoCamp 2012 - Open Source WebMapping
 
Make It Rain with Mapbox GL - Franz Neubert
Make It Rain with Mapbox GL - Franz NeubertMake It Rain with Mapbox GL - Franz Neubert
Make It Rain with Mapbox GL - Franz Neubert
 
Wxpysal website
Wxpysal websiteWxpysal website
Wxpysal website
 
Grafana selectel
Grafana selectelGrafana selectel
Grafana selectel
 
Map box styles in GeoServer and OpenLayers
Map box styles in GeoServer and OpenLayersMap box styles in GeoServer and OpenLayers
Map box styles in GeoServer and OpenLayers
 
Qubism and scala nlp
Qubism and scala nlpQubism and scala nlp
Qubism and scala nlp
 
Novidades FME 2017
Novidades FME 2017Novidades FME 2017
Novidades FME 2017
 
Azure Inside and Out
Azure Inside and OutAzure Inside and Out
Azure Inside and Out
 
FOSS4G2011 Report
FOSS4G2011 ReportFOSS4G2011 Report
FOSS4G2011 Report
 
Open source web-gis packages, geoserver-rest and pySLD
Open source web-gis packages, geoserver-rest and pySLDOpen source web-gis packages, geoserver-rest and pySLD
Open source web-gis packages, geoserver-rest and pySLD
 
Web gis implementation notes
Web gis implementation notesWeb gis implementation notes
Web gis implementation notes
 
Geonode introduction
Geonode introductionGeonode introduction
Geonode introduction
 
AtlasCT - Atlas Mobile Maps API for iOS
AtlasCT - Atlas Mobile Maps API for iOSAtlasCT - Atlas Mobile Maps API for iOS
AtlasCT - Atlas Mobile Maps API for iOS
 
Data Visualization
Data VisualizationData Visualization
Data Visualization
 
Cloud Computing and HTML5, 2010
Cloud Computing and HTML5, 2010Cloud Computing and HTML5, 2010
Cloud Computing and HTML5, 2010
 
Living Content - Smart Data - Esri UK Annual Conference 2017
Living Content - Smart Data - Esri UK Annual Conference 2017Living Content - Smart Data - Esri UK Annual Conference 2017
Living Content - Smart Data - Esri UK Annual Conference 2017
 
Grafana
GrafanaGrafana
Grafana
 
Mobile LBS
Mobile LBSMobile LBS
Mobile LBS
 

Semelhante a Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiConf NY 2014

"Open Mapping on iOS" — Justin Miller, MapBox
"Open Mapping on iOS" — Justin Miller, MapBox"Open Mapping on iOS" — Justin Miller, MapBox
"Open Mapping on iOS" — Justin Miller, MapBoxYandex
 
Lessons Learned from CityOpenSource
Lessons Learned from CityOpenSourceLessons Learned from CityOpenSource
Lessons Learned from CityOpenSourceMarco Montanari
 
Elevation API GeoBerlin 2020 Meetup
Elevation API GeoBerlin 2020 MeetupElevation API GeoBerlin 2020 Meetup
Elevation API GeoBerlin 2020 MeetupXavier Fischer
 
Sharing the Openness of the Maps via FOSS4G and the Web
Sharing the Openness of the Maps via FOSS4G and the WebSharing the Openness of the Maps via FOSS4G and the Web
Sharing the Openness of the Maps via FOSS4G and the WebHidenori Fujimura
 
“JavaScriptだけで作れる”からこそTitanium Moduleで Tiを256倍活用する!
“JavaScriptだけで作れる”からこそTitanium Moduleで Tiを256倍活用する!“JavaScriptだけで作れる”からこそTitanium Moduleで Tiを256倍活用する!
“JavaScriptだけで作れる”からこそTitanium Moduleで Tiを256倍活用する!Masato Kitao
 
OpenMapTiles: Vector tiles from OpenStreetMap
OpenMapTiles: Vector tiles from OpenStreetMapOpenMapTiles: Vector tiles from OpenStreetMap
OpenMapTiles: Vector tiles from OpenStreetMapPetr Pridal
 
Trail of Two Maps
Trail of Two MapsTrail of Two Maps
Trail of Two MapsMetroCog
 
CKEditor Widgets with Drupal
CKEditor Widgets with DrupalCKEditor Widgets with Drupal
CKEditor Widgets with DrupalRanel Padon
 
Building Maps with Leaflet
Building Maps with LeafletBuilding Maps with Leaflet
Building Maps with LeafletAndrew Howard
 
OSM for Wikimedians
OSM for WikimediansOSM for Wikimedians
OSM for Wikimedianstommorris
 
Firefox OS Graphics inside
Firefox OS Graphics insideFirefox OS Graphics inside
Firefox OS Graphics insideSotaro Ikeda
 
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)Ossama Alami
 
Advanced Android Design Implementation
Advanced Android Design ImplementationAdvanced Android Design Implementation
Advanced Android Design ImplementationTack Mobile
 
OldMapsOnline.org: Open Source &amp; Online Tools for Old Maps
OldMapsOnline.org: Open Source &amp; Online Tools for Old MapsOldMapsOnline.org: Open Source &amp; Online Tools for Old Maps
OldMapsOnline.org: Open Source &amp; Online Tools for Old MapsPetr Pridal
 
Don't let maps cramp your style - Prague
Don't let maps cramp your style - PragueDon't let maps cramp your style - Prague
Don't let maps cramp your style - PragueAndrew Larcombe
 

Semelhante a Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiConf NY 2014 (20)

"Open Mapping on iOS" — Justin Miller, MapBox
"Open Mapping on iOS" — Justin Miller, MapBox"Open Mapping on iOS" — Justin Miller, MapBox
"Open Mapping on iOS" — Justin Miller, MapBox
 
Lessons Learned from CityOpenSource
Lessons Learned from CityOpenSourceLessons Learned from CityOpenSource
Lessons Learned from CityOpenSource
 
4 march 2015 digimap urban map data cad
4 march 2015 digimap urban map data cad4 march 2015 digimap urban map data cad
4 march 2015 digimap urban map data cad
 
Elevation API GeoBerlin 2020 Meetup
Elevation API GeoBerlin 2020 MeetupElevation API GeoBerlin 2020 Meetup
Elevation API GeoBerlin 2020 Meetup
 
Sharing the Openness of the Maps via FOSS4G and the Web
Sharing the Openness of the Maps via FOSS4G and the WebSharing the Openness of the Maps via FOSS4G and the Web
Sharing the Openness of the Maps via FOSS4G and the Web
 
Patch Maps
Patch MapsPatch Maps
Patch Maps
 
“JavaScriptだけで作れる”からこそTitanium Moduleで Tiを256倍活用する!
“JavaScriptだけで作れる”からこそTitanium Moduleで Tiを256倍活用する!“JavaScriptだけで作れる”からこそTitanium Moduleで Tiを256倍活用する!
“JavaScriptだけで作れる”からこそTitanium Moduleで Tiを256倍活用する!
 
OpenMapTiles: Vector tiles from OpenStreetMap
OpenMapTiles: Vector tiles from OpenStreetMapOpenMapTiles: Vector tiles from OpenStreetMap
OpenMapTiles: Vector tiles from OpenStreetMap
 
Trail of Two Maps
Trail of Two MapsTrail of Two Maps
Trail of Two Maps
 
Digimap webinar - Urban Map data for CAD
Digimap webinar - Urban Map data for CADDigimap webinar - Urban Map data for CAD
Digimap webinar - Urban Map data for CAD
 
CKEditor Widgets with Drupal
CKEditor Widgets with DrupalCKEditor Widgets with Drupal
CKEditor Widgets with Drupal
 
Building Maps with Leaflet
Building Maps with LeafletBuilding Maps with Leaflet
Building Maps with Leaflet
 
OSM for Wikimedians
OSM for WikimediansOSM for Wikimedians
OSM for Wikimedians
 
[React-Native Tutorial] Map
[React-Native Tutorial] Map[React-Native Tutorial] Map
[React-Native Tutorial] Map
 
MapKit and SwissTrains
MapKit and SwissTrainsMapKit and SwissTrains
MapKit and SwissTrains
 
Firefox OS Graphics inside
Firefox OS Graphics insideFirefox OS Graphics inside
Firefox OS Graphics inside
 
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
 
Advanced Android Design Implementation
Advanced Android Design ImplementationAdvanced Android Design Implementation
Advanced Android Design Implementation
 
OldMapsOnline.org: Open Source &amp; Online Tools for Old Maps
OldMapsOnline.org: Open Source &amp; Online Tools for Old MapsOldMapsOnline.org: Open Source &amp; Online Tools for Old Maps
OldMapsOnline.org: Open Source &amp; Online Tools for Old Maps
 
Don't let maps cramp your style - Prague
Don't let maps cramp your style - PragueDon't let maps cramp your style - Prague
Don't let maps cramp your style - Prague
 

Mais de Adam Paxton

Designing APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecDesigning APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecAdam Paxton
 
Geolocation for Mobile Apps - Connect.tech Atlanta, 2017
Geolocation for Mobile Apps - Connect.tech Atlanta, 2017Geolocation for Mobile Apps - Connect.tech Atlanta, 2017
Geolocation for Mobile Apps - Connect.tech Atlanta, 2017Adam Paxton
 
Get Your Node.js API Swaggering with OpenAPI Spec
Get Your Node.js API Swaggering with OpenAPI SpecGet Your Node.js API Swaggering with OpenAPI Spec
Get Your Node.js API Swaggering with OpenAPI SpecAdam Paxton
 
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...Adam Paxton
 
Continuous Cross Platform Mobile App Development using Jenkins Build Server
Continuous Cross Platform Mobile App Development using Jenkins Build ServerContinuous Cross Platform Mobile App Development using Jenkins Build Server
Continuous Cross Platform Mobile App Development using Jenkins Build ServerAdam Paxton
 
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015Adam Paxton
 
Introduction to Appcelerator Titanium
Introduction to Appcelerator TitaniumIntroduction to Appcelerator Titanium
Introduction to Appcelerator TitaniumAdam Paxton
 

Mais de Adam Paxton (7)

Designing APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecDesigning APIs with OpenAPI Spec
Designing APIs with OpenAPI Spec
 
Geolocation for Mobile Apps - Connect.tech Atlanta, 2017
Geolocation for Mobile Apps - Connect.tech Atlanta, 2017Geolocation for Mobile Apps - Connect.tech Atlanta, 2017
Geolocation for Mobile Apps - Connect.tech Atlanta, 2017
 
Get Your Node.js API Swaggering with OpenAPI Spec
Get Your Node.js API Swaggering with OpenAPI SpecGet Your Node.js API Swaggering with OpenAPI Spec
Get Your Node.js API Swaggering with OpenAPI Spec
 
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
 
Continuous Cross Platform Mobile App Development using Jenkins Build Server
Continuous Cross Platform Mobile App Development using Jenkins Build ServerContinuous Cross Platform Mobile App Development using Jenkins Build Server
Continuous Cross Platform Mobile App Development using Jenkins Build Server
 
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
 
Introduction to Appcelerator Titanium
Introduction to Appcelerator TitaniumIntroduction to Appcelerator Titanium
Introduction to Appcelerator Titanium
 

Último

Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsMonica Sydney
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查ydyuyu
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdfMatthew Sinclair
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...kajalverma014
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Roommeghakumariji156
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsMonica Sydney
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...gajnagarg
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"growthgrids
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样ayvbos
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.krishnachandrapal52
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC
 
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsPriya Reddy
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制pxcywzqs
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasDigicorns Technologies
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样ayvbos
 
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime BalliaBallia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Balliameghakumariji156
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查ydyuyu
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdfMatthew Sinclair
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoilmeghakumariji156
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge GraphsEleniIlkou
 

Último (20)

Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girls
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call GirlsMira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
Mira Road Housewife Call Girls 07506202331, Nalasopara Call Girls
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime BalliaBallia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 

Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiConf NY 2014

  • 1. Building Custom Maps for Titanium with Mapbox and OpenStreetMap Adam Paxton tiConf NY 2014 adampaxton@polancomedia.com
 github.com/adampax
 @adampax
  • 2. Overview • Current Mapping Options in Titanium • Simple Map Styling with Mapbox • Crazy Map Stuff with TileMill • Lunch
  • 3. Ti Maps Today • Apple Maps • Supported through Ti API • iOS Only • Google Maps • Supported for Android through Ti API • Available for iOS through Community Modules
  • 4. Some Limitations • No custom styling • No complete offline capability* • Limited map data options
  • 9. So what about offline?
  • 10. Enter Mapbox • Map design and hosting company • Pretty much all tools are open source, many written in JavaScript, Node.js (we like) • Leverage existing dev skills to make maps (sound familiar?) • Design your map with Mapbox editors, host it on Mapbox with free or paid plan or on your own, display in your app or site with Mapbox SDKs and libraries. • Pinterest, Foursquare, Evernote, Github mapbox.com
  • 11. Mapbox Features • Free plan, up through enterprise level • Mapbox Streets - Powered by OpenStreetMap • Mapbox Terrain ($) • Mapbox Satellite ($) • iOS SDK, Android SDK in development • Mapbox.js - based on Leaflet • APIs for geocoding, map markers, direct tile image access, routing • TileMill
  • 12. And OpenStreetMap • “The Wikipedia of maps” • 1.5 Million editors • 12 Million miles of roads • 80 Million Buildings • Powers Mapbox Streets • Problem with something on your map? Log on to openstreetmap.org, fix it, watch it update on your Mapbox map (and everyone else’s map, too) mapbox.com/openstreetmap/openstreetmap.org
  • 13. Other Alternatives • Online mapping is a big world (h’yuk) • Other options provide some or most of what we need • ArcGIS (Esri) • Nutiteq • CloudMade • Mapquest Open • osmdroid - Android Library • Route-Me - iOS Library
  • 14. Simple Example The Job: • Design a simple map with Mapbox’s online editor • Host it on Mapbox • Display it in our Titanium App
  • 16. Mapbox Editor • Select your colors • Adjust Hue, Saturation, Lightness, Alpha • Save and copy the project ID • Done
  • 17. More Mapbox Editor Stuff • Easy styling • Terrain and satellite layers • Draw markers, lines, polygons • Import from geojson, kml, gpx, csv
  • 18. Add the Map Alloy Markup ! <Window id="win" title="TiCloak">! ! <Module id="mapView" module="com.polancomedia.mapbox" map="yourUserName.234jk2l3j" />! </Window>! ! Straight up Titanium ! var mapbox = require('com.polancomedia.mapbox');! ! var mapView = mapbox.createView({! ! map: 'yourUserName.234jk2l3j'! });! ! win.add(mapView); https://github.com/adampax/TiCloak
  • 19. The Titanium-Mapbox Module • Wrapper for Mapbox iOS SDK • github.com/adampax/titanium-mapbox • Also check out: • github.com/mapbox/mapbox-ios-sdk • github.com/mapbox/mapbox-android-sdk • Contribute!
  • 20. The Titanium-Mapbox Module • Supports Mapbox hosted and offline maps • Tile caching • Annotations, polygons, lines, routes • More to come
  • 21. • More styling • More data • More offline Fun Mode
  • 22. • Desktop map editor • OS X, Windows, Linux • Based on Mapnik • Powered with Node.js • Open source • Turns non map people into map people TileMill mapbox.com/tilemill/
  • 23. TileMill Options • Read GeoJSON, Shapefiles, KML, PostGIS, SQLite, CSV, etc • Organize the data as layers • Style layers with CartoCSS • Export as MBTiles file • Load locally in the app • Host on Mapbox, either on it’s own or as a layer of another map • Or export as PNG, SVG, PDF, Mapnik XML mapbox.com/tilemill/
  • 25. The Process Geodata Import Style Export oklahoma.geojson #oklahoma #oklahoma { … } oklahoma.mbtiles
  • 26. CartoCSS Styling • Map styling language for TileMill • Looks kind of like CSS • Supports variables, zoom level-based styling, applying multiple styles to a layer • mapbox.com/tilemill/docs/ manual/carto/ github.com/ajashton/pirate-map #countries {! ::outline1, ::outline2, ::outline3 {! line-color: @water;! line-width: 1;! line-join: round;! line-opacity: 0.5;! line-comp-op: multiply;! }! ::outline1 { line-smooth: 12; }! ::outline2 { line-smooth: 24; }! ::outline3 { line-smooth: 48; }! polygon-fill: lighten(@water,10);! polygon-opacity: 0.6;! }
  • 27. MBTiles • SQLite database, easy to transport • Store x, y and zoom value of each tile along with a blob image • Cut out the redundant tiles (how many images of blue ocean do we really need?) mapbox.com/developers/mbtiles/
  • 28. Before We Export • Maps are made up of tiles • We track x and y values of the tile, plus the zoom (z) level • z level 0 = Whole world in a single tile • z level 17 = About a city block • Each zoom level = 4z tiles • Entire world at z0 = 1 tile • Entire world at z17 = bazillion tiles Zoom 0 mapbox.com/developers/guide/ Zoom 1
  • 29. Trim Your Map • Be selective on zoom range • Trim your map to only export what you need - a city, neighborhood, etc. • Consider only exporting the layer/zoom level you need, and apply it to the Mapbox Streets map
  • 30. Where are all the streets and buildings and stuff? • By default, only country outlines are loaded • Some public data available through built-in Geodata browser • OSM Data must be imported manually • Pretty easy to do with OSM Bright
  • 31. OSM Bright • Tutorial for importing OSM data into TileMill • Script builds TileMill project with default carto templates github.com/mapbox/osm-bright
  • 32. Import OSM Data using OSM Bright • Better OSM Bright instructions: • mapbox.com/tilemill/docs/guides/osm-bright-mac- quickstart/ • Tips: • Use Postgresapp and osm2pgsql • Probably don’t need to download the world. Planet.osm: 400GB • Use extracts of regions, cities instead
  • 33. TM2 (development) • OSM Data built right in! - no more need to download extracts • Uses vector tiles • Mobile SDK support still a ways out github.com/mapbox/tm2
  • 34. Review • Use the online Mapbox Editor to easily style street maps of entire world for your app • Titanium-Mapbox module • Use TileMill for advanced styling and data display, and to export to MBTiles for offline access • OSM Bright to get up and running quickly with TileMill and OSM data