SlideShare a Scribd company logo
1 of 32
Download to read offline
Mapion Android Maps
        API
 #MA6 Mashup Caravan Android/VOCALOID
                  Talks



              2010/10/27
n
    n             / @honjo2
n
    n

n
    n

n
    n       API
    n
    n   Mapion Android Maps API
Mapion Android Maps API
n         Google Maps API
n

n
n   Android 1.6
1.       API
     n     http://labs.mapion.co.jp/api/androidmaps/register.html


2.                       jar
     n     http://labs.mapion.co.jp/api/dl/maps-0.8.jar



3.       AndroidManifest.xml
     n     <uses-permission android:name="android.permission.INTERNET"
           />
(1/2)
public class MainActivity extends MapActivity {
  @Override
  public void onCreate(Bundle bundle) {
    super.onCreate(bundle);
    MapView mapView = new MapView(this,
       APIKEY");
    mapView.setClickable(true); // false
    setContentView(mapView);
  }
}
(2/2)
n
    n   http://gist.github.com/635850
n                               /
(1/2)
//
mapView.getController().setCenter(
  new GeoPoint(
    (int) (35.7 * 1E6),
    (int) (139.7 * 1E6)
));

//
mapView.getController().setZoom(5);
(2/2)

n
    n   http://gist.github.com/635882
n                               /
(1/2)
//
mapView.getController().setCenter(
   new GeoPoint(
     (int) (35.7 * 1E6),
     (int) (139.7 * 1E6)
));

//
mapView.getController().animateTo(
   new GeoPoint(
     (int) (35.7 * 1E6),
     (int) (139.7 * 1E6)
));
(2/2)
n
    n   http://gist.github.com/635917
n                               /
(1/2)
Overlay circle = new Overlay() {
  @Override
  public void draw(Canvas canvas, MapView mapView, boolean shadow) {
                                          mapView,
    if (!shadow) {
      GeoPoint p = new GeoPoint((int) (35.641625 * 1E6),
                       GeoPoint((int)
        (int) (139.749803 * 1E6));
         int)

       Point pos = mapView.getProjection().toPixels(p, null);
                   mapView.getProjection().toPixels(p, null);

       Paint paint = new Paint();
       paint.setColor(Color.argb(150, 255, 0, 255));
       paint.setColor(Color.argb(150,
       paint.setAntiAlias(true);
       paint.setAntiAlias(true);

       canvas.drawCircle(pos.x, pos.y, 30.0f, paint);
       canvas.drawCircle(pos.x, pos.y,
   }
  }
};
mapView.getOverlays().add(circle);
mapView.getOverlays().add(circle);
(2/2)
n
    n   http://gist.github.com/635930
n                               /
(1/2)
Overlay line = new Overlay() {
  @Override
  public void draw(Canvas canvas, MapView mapView, boolean shadow) {
                                          mapView,
    if (!shadow) {
      GeoPoint one = new GeoPoint((int) (35.641625 * 1E6), (int) (139.749803 *
                         GeoPoint((int)                    (int)                 1E6));
      GeoPoint two = new GeoPoint((int) (35.642625 * 1E6), (int) (139.747803 *
                         GeoPoint((int)                    (int)                 1E6));
      GeoPoint three = new GeoPoint((int) (35.642625 * 1E6), (int) (139.750803
                           GeoPoint((int)                    (int)               * 1E6));

       Point   onePoint =   mapView.getProjection().toPixels(one, null);
                            mapView.getProjection().toPixels(one, null);
       Point   twoPoint =   mapView.getProjection().toPixels(two, null);
                            mapView.getProjection().toPixels(two, null);
       Point   threePoint   = mapView.getProjection().toPixels(three, null);
                              mapView.getProjection().toPixels(three, null);

       Paint paint = new Paint();
       paint.setAntiAlias(true);
       paint.setAntiAlias(true);

       paint.setStrokeWidth(4);
       paint.setStyle(Paint.Style.STROKE);
       paint.setStyle(Paint.Style.STROKE);
       paint.setColor(Color.argb(150, 255, 0, 255));
       paint.setColor(Color.argb(150,
       canvas.drawLines(new float[]{onePoint.x, onePoint.y, twoPoint.x, twoPoint.y,
       canvas.drawLines(new float[]{onePoint.x, onePoint.y, twoPoint.x, twoPoint.y,
         twoPoint.x, twoPoint.y, threePoint.x, threePoint.y}, paint);
         twoPoint.x, twoPoint.y, threePoint.x, threePoint.y},
   }
   }
};
mapView.getOverlays().add(line);
mapView.getOverlays().add(line);
(2/2)
n
    n   http://gist.github.com/635942
n                               /
(1/2)
Overlay polygon = new Overlay() {
  @Override
  public void draw(Canvas canvas, MapView mapView, boolean shadow) {
                                          mapView,
    if (!shadow) {
      GeoPoint one = new GeoPoint(35641625, 139749803);
      GeoPoint two = new GeoPoint(35642625, 139747803);
      GeoPoint three = new GeoPoint(35642625, 139751803);

      Point onePoint = mapView.getProjection().toPixels(one, null);
                       mapView.getProjection().toPixels(one, null);
      Point twoPoint = mapView.getProjection().toPixels(two, null);
                       mapView.getProjection().toPixels(two, null);
      Point threePoint = mapView.getProjection().toPixels(three, null);
                         mapView.getProjection().toPixels(three, null);

      Paint paint = new Paint();
      paint.setAntiAlias(true);
      paint.setAntiAlias(true);
      paint.setColor(Color.argb(150, 255, 0, 255));
      paint.setColor(Color.argb(150,
      paint.setStyle(Paint.Style.FILL_AND_STROKE);
      paint.setStyle(Paint.Style.FILL_AND_STROKE);
      Path path = new Path();

      path.moveTo(onePoint.x, onePoint.y);
      path.moveTo(onePoint.x, onePoint.y);
      path.lineTo(twoPoint.x, twoPoint.y);
      path.lineTo(twoPoint.x, twoPoint.y);
      path.lineTo(threePoint.x, threePoint.y);
      path.lineTo(threePoint.x, threePoint.y);
      path.lineTo(onePoint.x, onePoint.y);
      path.lineTo(onePoint.x, onePoint.y);
      canvas.drawPath(path, paint);
      canvas.drawPath(path,
    }
  }
};
mapView.getOverlays().add(polygon);
mapView.getOverlays().add(polygon);
(2/2)
n
    n   http://gist.github.com/635949
n                               /
(1/2)
n   ItemizedOverlay
(2/2)
n
    n   http://gist.github.com/635958
n                               /
(1/2)
mapView.setRotation(true);
mapView.setDegrees(45.0f); //
(2/2)
n
    n   http://gist.github.com/635978
n
R               (1/2)
@Override
public boolean onSingleTapUp(MotionEvent e) {
  GeoPoint temp = mapView.getProjection()
    .fromPixels(
      (int) e.getX(),
      (int) e.getY()
    );

    mapView.getController().animateTo(temp);

    return false;
}
R             (2/2)

n
    n   http://gist.github.com/633865
n                               /
(1/2)
n
    n   mapView.changeMap(MapView.STANDARD);


n
    n   mapView.changeMap(MapView.LIGHT);
(2/2)
n
    n   http://gist.github.com/648611
n
Tips
n
    GeoPoint tky = Map.wgsToTky(
      new GeoPoint(35500000, 139500000)
    );
    GeoPoint wgs = Map.tkyToWgs(tky);


n
    n         10 1 10
    n   Max             MapView#getMaxZoomLevel
n   Google Maps
n
n       Google Maps
n        Android
n
    n

    n

n
n
    n
    n         VOCALOID
n
    n

n   Geo
    n   Geo
n

n
n   Android Maps API
    n



n
    n
    n   Android
         n
         n             256x256   128x128

More Related Content

What's hot

Geo Spatial Plot using R
Geo Spatial Plot using R Geo Spatial Plot using R
Geo Spatial Plot using R Rupak Roy
 
Geolocation Databases in Ruby on Rails
Geolocation Databases in Ruby on RailsGeolocation Databases in Ruby on Rails
Geolocation Databases in Ruby on RailsIreneusz Skrobiś
 
Data visualization with multiple groups using ggplot2
Data visualization with multiple groups using ggplot2Data visualization with multiple groups using ggplot2
Data visualization with multiple groups using ggplot2Rupak Roy
 
Basics of Computer graphics lab
Basics of Computer graphics labBasics of Computer graphics lab
Basics of Computer graphics labPriya Goyal
 
ggplot2できれいなグラフ
ggplot2できれいなグラフggplot2できれいなグラフ
ggplot2できれいなグラフDaisuke Ichikawa
 
Butterfly Counting in Bipartite Networks
Butterfly Counting in Bipartite NetworksButterfly Counting in Bipartite Networks
Butterfly Counting in Bipartite NetworksSeyed-Vahid Sanei-Mehri
 
computer graphics slides by Talha shah
computer graphics slides by Talha shahcomputer graphics slides by Talha shah
computer graphics slides by Talha shahSyed Talha
 
The Ring programming language version 1.5.3 book - Part 65 of 184
The Ring programming language version 1.5.3 book - Part 65 of 184The Ring programming language version 1.5.3 book - Part 65 of 184
The Ring programming language version 1.5.3 book - Part 65 of 184Mahmoud Samir Fayed
 
Computer graphics
Computer graphicsComputer graphics
Computer graphicssnelkoli
 
Computer graphics practical(jainam)
Computer graphics practical(jainam)Computer graphics practical(jainam)
Computer graphics practical(jainam)JAINAM KAPADIYA
 
Exploring Color Spaces
 with Gesture Tracking and Smart Bulbs (Distill 2014)
Exploring Color Spaces
 with Gesture Tracking and Smart Bulbs (Distill 2014)Exploring Color Spaces
 with Gesture Tracking and Smart Bulbs (Distill 2014)
Exploring Color Spaces
 with Gesture Tracking and Smart Bulbs (Distill 2014)Daniel Luxemburg
 
analog clock C#
analog clock C#analog clock C#
analog clock C#omeed
 

What's hot (20)

My favorite slides
My favorite slidesMy favorite slides
My favorite slides
 
662305 LAB12
662305 LAB12662305 LAB12
662305 LAB12
 
Geo Spatial Plot using R
Geo Spatial Plot using R Geo Spatial Plot using R
Geo Spatial Plot using R
 
Geolocation Databases in Ruby on Rails
Geolocation Databases in Ruby on RailsGeolocation Databases in Ruby on Rails
Geolocation Databases in Ruby on Rails
 
Data visualization with multiple groups using ggplot2
Data visualization with multiple groups using ggplot2Data visualization with multiple groups using ggplot2
Data visualization with multiple groups using ggplot2
 
Basics of Computer graphics lab
Basics of Computer graphics labBasics of Computer graphics lab
Basics of Computer graphics lab
 
Games 3 dl4-example
Games 3 dl4-exampleGames 3 dl4-example
Games 3 dl4-example
 
Maps
MapsMaps
Maps
 
Funções 3
Funções 3Funções 3
Funções 3
 
ggplot2できれいなグラフ
ggplot2できれいなグラフggplot2できれいなグラフ
ggplot2できれいなグラフ
 
Butterfly Counting in Bipartite Networks
Butterfly Counting in Bipartite NetworksButterfly Counting in Bipartite Networks
Butterfly Counting in Bipartite Networks
 
Introduction to graphics programming in c
Introduction to graphics programming in cIntroduction to graphics programming in c
Introduction to graphics programming in c
 
computer graphics slides by Talha shah
computer graphics slides by Talha shahcomputer graphics slides by Talha shah
computer graphics slides by Talha shah
 
The Ring programming language version 1.5.3 book - Part 65 of 184
The Ring programming language version 1.5.3 book - Part 65 of 184The Ring programming language version 1.5.3 book - Part 65 of 184
The Ring programming language version 1.5.3 book - Part 65 of 184
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Computer graphics practical(jainam)
Computer graphics practical(jainam)Computer graphics practical(jainam)
Computer graphics practical(jainam)
 
OpenGL Starter L02
OpenGL Starter L02OpenGL Starter L02
OpenGL Starter L02
 
Types of function
Types of function Types of function
Types of function
 
Exploring Color Spaces
 with Gesture Tracking and Smart Bulbs (Distill 2014)
Exploring Color Spaces
 with Gesture Tracking and Smart Bulbs (Distill 2014)Exploring Color Spaces
 with Gesture Tracking and Smart Bulbs (Distill 2014)
Exploring Color Spaces
 with Gesture Tracking and Smart Bulbs (Distill 2014)
 
analog clock C#
analog clock C#analog clock C#
analog clock C#
 

Similar to Mashup caravan android-talks

Mobile Game and Application with J2ME - Collision Detection
Mobile Gameand Application withJ2ME  - Collision DetectionMobile Gameand Application withJ2ME  - Collision Detection
Mobile Game and Application with J2ME - Collision DetectionJenchoke Tachagomain
 
Mobile Game and Application with J2ME
Mobile Gameand Application with J2MEMobile Gameand Application with J2ME
Mobile Game and Application with J2MEJenchoke Tachagomain
 
Creating an Uber Clone - Part VIII.pdf
Creating an Uber Clone - Part VIII.pdfCreating an Uber Clone - Part VIII.pdf
Creating an Uber Clone - Part VIII.pdfShaiAlmog1
 
Maps - Part 3.pdf
Maps - Part 3.pdfMaps - Part 3.pdf
Maps - Part 3.pdfShaiAlmog1
 
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdfimport java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdfanyacarpets
 
Creating an Uber Clone - Part VII.pdf
Creating an Uber Clone - Part VII.pdfCreating an Uber Clone - Part VII.pdf
Creating an Uber Clone - Part VII.pdfShaiAlmog1
 
-- USING UNITY TRYING TO CREATE A CLICK TO PATH- THAT YOU CLICK ON AND.pdf
-- USING UNITY TRYING TO CREATE A CLICK TO PATH- THAT YOU CLICK ON AND.pdf-- USING UNITY TRYING TO CREATE A CLICK TO PATH- THAT YOU CLICK ON AND.pdf
-- USING UNITY TRYING TO CREATE A CLICK TO PATH- THAT YOU CLICK ON AND.pdfganisyedtrd
 
Creating an Uber Clone - Part VIII - Transcript.pdf
Creating an Uber Clone - Part VIII - Transcript.pdfCreating an Uber Clone - Part VIII - Transcript.pdf
Creating an Uber Clone - Part VIII - Transcript.pdfShaiAlmog1
 
Maps - Part 3 - Transcript.pdf
Maps - Part 3 - Transcript.pdfMaps - Part 3 - Transcript.pdf
Maps - Part 3 - Transcript.pdfShaiAlmog1
 
Create a java project that - Draw a circle with three random init.pdf
Create a java project that - Draw a circle with three random init.pdfCreate a java project that - Draw a circle with three random init.pdf
Create a java project that - Draw a circle with three random init.pdfarihantmobileselepun
 
openFrameworks 007 - 3D
openFrameworks 007 - 3DopenFrameworks 007 - 3D
openFrameworks 007 - 3Droxlu
 
package chapter15;import javafx.application.Application;import j.pdf
package chapter15;import javafx.application.Application;import j.pdfpackage chapter15;import javafx.application.Application;import j.pdf
package chapter15;import javafx.application.Application;import j.pdfKARTIKINDIA
 
Exploring Canvas
Exploring CanvasExploring Canvas
Exploring CanvasKevin Hoyt
 
Adding where to your ruby apps
Adding where to your ruby appsAdding where to your ruby apps
Adding where to your ruby appsRoberto Pepato
 
Bindings: the zen of montage
Bindings: the zen of montageBindings: the zen of montage
Bindings: the zen of montageKris Kowal
 
Import java.awt.; Import acm.program.; Import acm.graphics.;.pdf
Import java.awt.; Import acm.program.; Import acm.graphics.;.pdfImport java.awt.; Import acm.program.; Import acm.graphics.;.pdf
Import java.awt.; Import acm.program.; Import acm.graphics.;.pdfapexcomputer54
 

Similar to Mashup caravan android-talks (20)

Mobile Game and Application with J2ME - Collision Detection
Mobile Gameand Application withJ2ME  - Collision DetectionMobile Gameand Application withJ2ME  - Collision Detection
Mobile Game and Application with J2ME - Collision Detection
 
Mobile Game and Application with J2ME
Mobile Gameand Application with J2MEMobile Gameand Application with J2ME
Mobile Game and Application with J2ME
 
Creating an Uber Clone - Part VIII.pdf
Creating an Uber Clone - Part VIII.pdfCreating an Uber Clone - Part VIII.pdf
Creating an Uber Clone - Part VIII.pdf
 
Maps - Part 3.pdf
Maps - Part 3.pdfMaps - Part 3.pdf
Maps - Part 3.pdf
 
libGDX: Tiled Maps
libGDX: Tiled MapslibGDX: Tiled Maps
libGDX: Tiled Maps
 
Applications
ApplicationsApplications
Applications
 
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdfimport java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
import java.awt.;import java.awt.event.MouseAdaptor;import java.pdf
 
Creating an Uber Clone - Part VII.pdf
Creating an Uber Clone - Part VII.pdfCreating an Uber Clone - Part VII.pdf
Creating an Uber Clone - Part VII.pdf
 
-- USING UNITY TRYING TO CREATE A CLICK TO PATH- THAT YOU CLICK ON AND.pdf
-- USING UNITY TRYING TO CREATE A CLICK TO PATH- THAT YOU CLICK ON AND.pdf-- USING UNITY TRYING TO CREATE A CLICK TO PATH- THAT YOU CLICK ON AND.pdf
-- USING UNITY TRYING TO CREATE A CLICK TO PATH- THAT YOU CLICK ON AND.pdf
 
662305 11
662305 11662305 11
662305 11
 
Creating an Uber Clone - Part VIII - Transcript.pdf
Creating an Uber Clone - Part VIII - Transcript.pdfCreating an Uber Clone - Part VIII - Transcript.pdf
Creating an Uber Clone - Part VIII - Transcript.pdf
 
Maps - Part 3 - Transcript.pdf
Maps - Part 3 - Transcript.pdfMaps - Part 3 - Transcript.pdf
Maps - Part 3 - Transcript.pdf
 
Create a java project that - Draw a circle with three random init.pdf
Create a java project that - Draw a circle with three random init.pdfCreate a java project that - Draw a circle with three random init.pdf
Create a java project that - Draw a circle with three random init.pdf
 
openFrameworks 007 - 3D
openFrameworks 007 - 3DopenFrameworks 007 - 3D
openFrameworks 007 - 3D
 
package chapter15;import javafx.application.Application;import j.pdf
package chapter15;import javafx.application.Application;import j.pdfpackage chapter15;import javafx.application.Application;import j.pdf
package chapter15;import javafx.application.Application;import j.pdf
 
Exploring Canvas
Exploring CanvasExploring Canvas
Exploring Canvas
 
Adding where to your ruby apps
Adding where to your ruby appsAdding where to your ruby apps
Adding where to your ruby apps
 
Map kit light
Map kit lightMap kit light
Map kit light
 
Bindings: the zen of montage
Bindings: the zen of montageBindings: the zen of montage
Bindings: the zen of montage
 
Import java.awt.; Import acm.program.; Import acm.graphics.;.pdf
Import java.awt.; Import acm.program.; Import acm.graphics.;.pdfImport java.awt.; Import acm.program.; Import acm.graphics.;.pdf
Import java.awt.; Import acm.program.; Import acm.graphics.;.pdf
 

Recently uploaded

Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 

Recently uploaded (20)

Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 

Mashup caravan android-talks

  • 1. Mapion Android Maps API #MA6 Mashup Caravan Android/VOCALOID Talks 2010/10/27
  • 2. n n / @honjo2 n n n n n n API n n Mapion Android Maps API
  • 3. Mapion Android Maps API n Google Maps API n n
  • 4. n Android 1.6
  • 5. 1. API n http://labs.mapion.co.jp/api/androidmaps/register.html 2. jar n http://labs.mapion.co.jp/api/dl/maps-0.8.jar 3. AndroidManifest.xml n <uses-permission android:name="android.permission.INTERNET" />
  • 6.
  • 7. (1/2) public class MainActivity extends MapActivity { @Override public void onCreate(Bundle bundle) { super.onCreate(bundle); MapView mapView = new MapView(this, APIKEY"); mapView.setClickable(true); // false setContentView(mapView); } }
  • 8. (2/2) n n http://gist.github.com/635850 n /
  • 9. (1/2) // mapView.getController().setCenter( new GeoPoint( (int) (35.7 * 1E6), (int) (139.7 * 1E6) )); // mapView.getController().setZoom(5);
  • 10. (2/2) n n http://gist.github.com/635882 n /
  • 11. (1/2) // mapView.getController().setCenter( new GeoPoint( (int) (35.7 * 1E6), (int) (139.7 * 1E6) )); // mapView.getController().animateTo( new GeoPoint( (int) (35.7 * 1E6), (int) (139.7 * 1E6) ));
  • 12. (2/2) n n http://gist.github.com/635917 n /
  • 13. (1/2) Overlay circle = new Overlay() { @Override public void draw(Canvas canvas, MapView mapView, boolean shadow) { mapView, if (!shadow) { GeoPoint p = new GeoPoint((int) (35.641625 * 1E6), GeoPoint((int) (int) (139.749803 * 1E6)); int) Point pos = mapView.getProjection().toPixels(p, null); mapView.getProjection().toPixels(p, null); Paint paint = new Paint(); paint.setColor(Color.argb(150, 255, 0, 255)); paint.setColor(Color.argb(150, paint.setAntiAlias(true); paint.setAntiAlias(true); canvas.drawCircle(pos.x, pos.y, 30.0f, paint); canvas.drawCircle(pos.x, pos.y, } } }; mapView.getOverlays().add(circle); mapView.getOverlays().add(circle);
  • 14. (2/2) n n http://gist.github.com/635930 n /
  • 15. (1/2) Overlay line = new Overlay() { @Override public void draw(Canvas canvas, MapView mapView, boolean shadow) { mapView, if (!shadow) { GeoPoint one = new GeoPoint((int) (35.641625 * 1E6), (int) (139.749803 * GeoPoint((int) (int) 1E6)); GeoPoint two = new GeoPoint((int) (35.642625 * 1E6), (int) (139.747803 * GeoPoint((int) (int) 1E6)); GeoPoint three = new GeoPoint((int) (35.642625 * 1E6), (int) (139.750803 GeoPoint((int) (int) * 1E6)); Point onePoint = mapView.getProjection().toPixels(one, null); mapView.getProjection().toPixels(one, null); Point twoPoint = mapView.getProjection().toPixels(two, null); mapView.getProjection().toPixels(two, null); Point threePoint = mapView.getProjection().toPixels(three, null); mapView.getProjection().toPixels(three, null); Paint paint = new Paint(); paint.setAntiAlias(true); paint.setAntiAlias(true); paint.setStrokeWidth(4); paint.setStyle(Paint.Style.STROKE); paint.setStyle(Paint.Style.STROKE); paint.setColor(Color.argb(150, 255, 0, 255)); paint.setColor(Color.argb(150, canvas.drawLines(new float[]{onePoint.x, onePoint.y, twoPoint.x, twoPoint.y, canvas.drawLines(new float[]{onePoint.x, onePoint.y, twoPoint.x, twoPoint.y, twoPoint.x, twoPoint.y, threePoint.x, threePoint.y}, paint); twoPoint.x, twoPoint.y, threePoint.x, threePoint.y}, } } }; mapView.getOverlays().add(line); mapView.getOverlays().add(line);
  • 16. (2/2) n n http://gist.github.com/635942 n /
  • 17. (1/2) Overlay polygon = new Overlay() { @Override public void draw(Canvas canvas, MapView mapView, boolean shadow) { mapView, if (!shadow) { GeoPoint one = new GeoPoint(35641625, 139749803); GeoPoint two = new GeoPoint(35642625, 139747803); GeoPoint three = new GeoPoint(35642625, 139751803); Point onePoint = mapView.getProjection().toPixels(one, null); mapView.getProjection().toPixels(one, null); Point twoPoint = mapView.getProjection().toPixels(two, null); mapView.getProjection().toPixels(two, null); Point threePoint = mapView.getProjection().toPixels(three, null); mapView.getProjection().toPixels(three, null); Paint paint = new Paint(); paint.setAntiAlias(true); paint.setAntiAlias(true); paint.setColor(Color.argb(150, 255, 0, 255)); paint.setColor(Color.argb(150, paint.setStyle(Paint.Style.FILL_AND_STROKE); paint.setStyle(Paint.Style.FILL_AND_STROKE); Path path = new Path(); path.moveTo(onePoint.x, onePoint.y); path.moveTo(onePoint.x, onePoint.y); path.lineTo(twoPoint.x, twoPoint.y); path.lineTo(twoPoint.x, twoPoint.y); path.lineTo(threePoint.x, threePoint.y); path.lineTo(threePoint.x, threePoint.y); path.lineTo(onePoint.x, onePoint.y); path.lineTo(onePoint.x, onePoint.y); canvas.drawPath(path, paint); canvas.drawPath(path, } } }; mapView.getOverlays().add(polygon); mapView.getOverlays().add(polygon);
  • 18. (2/2) n n http://gist.github.com/635949 n /
  • 19. (1/2) n ItemizedOverlay
  • 20. (2/2) n n http://gist.github.com/635958 n /
  • 22. (2/2) n n http://gist.github.com/635978 n
  • 23. R (1/2) @Override public boolean onSingleTapUp(MotionEvent e) { GeoPoint temp = mapView.getProjection() .fromPixels( (int) e.getX(), (int) e.getY() ); mapView.getController().animateTo(temp); return false; }
  • 24. R (2/2) n n http://gist.github.com/633865 n /
  • 25. (1/2) n n mapView.changeMap(MapView.STANDARD); n n mapView.changeMap(MapView.LIGHT);
  • 26. (2/2) n n http://gist.github.com/648611 n
  • 27. Tips n GeoPoint tky = Map.wgsToTky( new GeoPoint(35500000, 139500000) ); GeoPoint wgs = Map.tkyToWgs(tky); n n 10 1 10 n Max MapView#getMaxZoomLevel
  • 28. n Google Maps
  • 29. n n Google Maps n Android n n n n
  • 30. n n n VOCALOID n n n Geo n Geo
  • 31. n n
  • 32. n Android Maps API n n n n Android n n 256x256 128x128