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

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 

Recently uploaded (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

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