Intro to Apps with Maps for Series 40 (Turkish)
-
Upload
microsoft-mobile-developer -
Category
Technology
-
view
1.024 -
download
4
Transcript of Intro to Apps with Maps for Series 40 (Turkish)
![Page 1: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/1.jpg)
1
Görkem Ercan (@GorkemErcan) Nokia
Nokia Series 40 için Harita ve Lokasyon Uygulamaları Geliştirmek
![Page 2: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/2.jpg)
1. Giriş 2. Kurulum 3. Temel Harita işlemleri 4. Harita işaretleri 5. Konum ve Arama Servisleri 6. Konum Belirleme
Ajanda
2
![Page 3: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/3.jpg)
Nokia Kütüphanelerine Giriş
3
![Page 4: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/4.jpg)
Nokia Harita Uygulama Kütüphaneleri
4
• Maps API for JavaScript
• Nokia Places API (beta)
• Map Image API for HTTP
• Maps API for Qt
• Maps API for Java ME
http://www.developer.nokia.com/Maps/
![Page 5: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/5.jpg)
Nokia Java ME Harita Kütüphanesi
5
• MIDP 2.0 ve üstü telefonları destekler
• Series 40 telefonlar için optimize
• Façade Pattern ile alt seviye tüm detayları saklar
• 150 kB büyüklüğünde
• Farklı harita tipleri (Uydu, Alan, Transit vs)
• Polyline, polygon, işaretler gibi harita temel harita
objelerine destek
• Arama, yol tarifi gibi servislere destek
• Genişletilebilir
http://www.developer.nokia.com/Develop/Maps/Maps_API_for_Java_ME/
![Page 6: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/6.jpg)
Nokia Java ME Harita Kütüphanesi ve Statik Harita Servisleri
6
Statik Servis Nokia Java ME Harita Kütüphanesi
![Page 7: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/7.jpg)
Kurulum
7
![Page 8: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/8.jpg)
Alışveriş Listesi
8
1. Java Runtime Environment 6
http://www.java.com/en/download/index.jsp
2. Eclipse ve Eclipse MTJ
http://www.eclipse.org/mtj http://www.developer.nokia.com/Resources/Library/Java/#!getting-started/
3. Nokia SDK for Java
http://www.developer.nokia.com/Develop/Java/Tools/
4. Nokia Java ME Harita kütüphanesi http://www.developer.nokia.com/Develop/Maps/Maps_API_for_Java_ME/Getting_started/
![Page 9: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/9.jpg)
Java Harita Kütüphanesi
9
Jar dosyasını indirin http://www.developer.nokia.com/Develop/Maps/Maps_API_for_Java_ME/Getting_started/
Nokia SDK for Java 2.0 içine entegre
![Page 10: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/10.jpg)
Eclipse Ayarları
10
Projenize harita kütüphanesini ekleyin.
![Page 11: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/11.jpg)
Nokia Developer kaydı
11
Ücretsiz olarak developer.nokia.com adresinde kayıt olun
![Page 12: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/12.jpg)
Token ve AppID
12
Her bir uygulamanız için ücretsiz olarak bir App Id and Token alın
https://api.developer.nokia.com/ovi-api/ui/registration
![Page 13: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/13.jpg)
Temel Harita İşlemleri
13
![Page 14: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/14.jpg)
İlk Haritam
14
5 satırda tam bir harita 1. AppId ve Token’ ı ApplicationContext’e bildir
2. Bir MapCanvas yarat
3. Display.setCurrent() ile görüntüle
![Page 15: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/15.jpg)
Farklı Harita Çeşitleri
15
Temel Harita tipleri
Kod
![Page 16: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/16.jpg)
Daha Çok Çeşitlerde Harita
16
1) Bir MapSchemeListener yarat ve getAvailableMaps()’i çağır
2) Başarılı veya Hatalı geri dönüşleri işle
1) Geri dönen MapProviders listesine göre BaseMapType belirle
![Page 17: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/17.jpg)
Harita dilleri
17
• 8 farklı dil destekleniyor, henüz Türkçe yok • Arapça, Çince, Almanca, İngilizce,
Fransızca, İtalyanca,Rusça, İspanyolca
• ApplicationContext’ de DefaultLanguage belirlemek yeterli
• Varsayılan dil İngilizce
![Page 18: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/18.jpg)
18
• MapDisplay objesinde oluşan olaylardan haberdar olmak için bir MapComponent yaratın
• MapComponent ‘a bir EventListener ekleyin
Haritadaki olaylardan haberdar olmak
![Page 19: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/19.jpg)
Harita işaretleri
19
![Page 20: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/20.jpg)
Haritada İşaretler
20
• MapStandardMarker • Çeşitli geometrik şekiller ve Balloon • Kolayca yazı eklenebilir, renk belirlenebilir • Varsayılan işaret ‘Nokia Mavisi’ Balloon
• MapMarker
• Genelde resim ikonlar eklemek için kullanılır
• MapFactory kullanarak yaratılırlar
![Page 21: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/21.jpg)
Polyline ve Polygonlar
21
• MapPolyline birbirine bağlı noktalardan oluşur
• MapPolygon bağlı noktaların arasındaki alandır
• Tüm diğer harita objeleri gibi MapFactory ile yaratılırlar
• Bu objelerindeki GeoBoundingBox sıkça kullanacağınız bir özellikdir
![Page 22: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/22.jpg)
MapCanvas MapDisplay MapObject
22
• MapCanvas , MapFactory ve MapDisplay objelerini barındırır • MapFactory tüm MapObject tipindeki objelerin yaratılmasında
kullanılır • MapFactory kullanarak bir MapDisplay yaratabilirsiniz
• MapDisplay kendisi de MapObject tipinde bir objedir • MapObject tipindeki objeler bir MapContainer içinde tutulabilir
![Page 23: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/23.jpg)
Konum ve Arama Servisleri
23
![Page 24: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/24.jpg)
Geocode Arama
24
• Adresten harita lokasyonunu arar
• Aramalar senkron veya asenkron olabilir
• Asenkron olanı tercih edin
1. Bir GeoCodeRequestListener yaratın
2. Bir GeoCodeRequest yaratın
3. Başarılı ve başarısız dönüşde ne yapacağınıza karar verin
![Page 25: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/25.jpg)
Geri Geocode Arama
25
• Coğrafik koordinatlardan adres aramadı. • Aramalar senkron veya asenkron olabilir • Asenkron olanı tercih edin
1. ReverseGeocodeRequestListener yaratın
2. ReverseGeoCodeRequest yaratın
3. Başarılı ve başarısız dönüşde ne yapacağınıza karar verin
![Page 26: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/26.jpg)
Yer Arama
26
• Yerel aramalar • Text arama (örnek: “Pizza”) • Kategori arama (örnek: restaurant) • Veya kombinasyonu (örnek: “Cake” + restaurant)
• Detaylı sonuçlar
• Haberleşme bilgileri • Açılış zamanları • Tanımlar, yorumlar • Resimler...
![Page 27: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/27.jpg)
Nasıl Yer Arama Yapılır
27
1. PlaceSearchRequestListener yarat
2. PlaceSearchRequest yarat
3. Başarılı ve başarısız dönüşde ne yapacağınıza karar verin
4. Detaylara Result içinden ulaşabilirsiniz
![Page 28: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/28.jpg)
Rota Servisi
28
• Rota Servisi bir veya daha fazla nokta (waypoint) arasında yol bulmak için kullanılır
• Rota servisinden cevap dönmesi zaman alabilir onun için Rota servisi ile asenkron çalışmak daha iyidir
1. RouteListener yarat
2. RouteRequest yarat
3. Başarılı ve başarısız dönüşde ne yapacağınıza karar verin
![Page 29: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/29.jpg)
• Routing Type – default is RoutingType.Shortest
• Mode of Transport – default is TransportMode.CAR
• Additional Restrictions – None are selected by default
Rota Servisi
29
• Yol hesaplama yöntemi RoutingMode parametreleri değiştirilerek optimize edilebilir
![Page 30: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/30.jpg)
Paylaşma Yöneticisi
30
• RESTful harita kütüphanesi için Kısa ve şifreli URL’ ler oluşturur
• URL SMS veya benzeri bir yöntemle aynı haritayı açmak üzere paylaşılabilir
• İstemci yeteneklerine göre maps.nokia.com veya m.maps.nokia.com açılır
![Page 31: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/31.jpg)
Konum belirleme
31
![Page 32: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/32.jpg)
Series 40 telefonlar ile konum bulmak
32
• Java uygulamaları JSR-179 Location kütüphanesi ile konum beliryebilirler
• İki şekilde konum belirlenebilir • Cell ID positioning • GPS
• Series 40 telefon GPS pek çok modelde bulunmadığından Cell-ID daha yaygın bir yöntemdir
• Harita kütüphanesinin bir parçası değildir
![Page 33: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/33.jpg)
Cell-ID ile konum belirleme
33
• Yöntem bir servise cihazın o anda iletişimde bulunduğu GSM
hücresinin numarasını bildirilmesi ve servisten bunun karşılığında bir coğrafik koordinat alınması ile gerçekleşir
• Bu yöntemin yanılma payı bölgedeki hücre sıklığına göre değişir
0 2000 4000 6000 8000
10000 12000
Urban Suburban Rural
Accu
racy
(met
ers)
Cell-ID accuracy
![Page 34: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/34.jpg)
Cell-ID ile Konum Belirleme 1) LocationUtil kullanarak Cell-ID destekleyen bir
LocationProvider yarat Note: getLocationProvider() ikinci parametresini şimdilik null verebilirsiniz.
2) getLocation() çağır ve sonucu işle
QualifiedCoordinate ve GeoCoordinate arasında birebir eşleşme vardır
34
![Page 35: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/35.jpg)
LocationUtil • Konum belirleme yöntemleri aşağıdaki
gibi kombinasyonlar olabilir
Useful Combinations • Offline Cell ID
• Standalone GPS
• Assisted GPS
• Online Cell ID an/or WLAN
35
![Page 36: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/36.jpg)
GPS ile Konum Belirleme
1. Create a GPS LocationProvider
2. Set the provider to start polling
3. Retrieve and process the result
36
![Page 37: Intro to Apps with Maps for Series 40 (Turkish)](https://reader036.fdocuments.net/reader036/viewer/2022062514/55a19ad61a28abec748b47e2/html5/thumbnails/37.jpg)
Daha Fazla Bilgi En son SDK ve bilgiler için http://developer.nokia.com Nokia Developer Java dökümanları http://www.developer.nokia.com/Resources/Library/Java Nokia Harita Kütüphaneleri http://developer.nokia.com/Maps Bu webinardaki kod örnekleri https://github.com/gorkem/MapsWebinar Nokia Developer Türkiye http://developer.nokia.com/tr http://facebook.com/NokiaDevTr http://twitter.com/NokiaDevTr
37