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

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
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
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
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
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
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
 
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
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Recently uploaded (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
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...
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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...
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

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