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

Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
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
 
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
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
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
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 

Recently uploaded (20)

Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
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
 
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
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 

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