SlideShare a Scribd company logo
1 of 40
•
• Web       API
• Android
• Hack
•
•         (@MaripoGoda)

•
•                       “ToriSat”

• Geo   (Android, iOS, Web etc)

•
iPhone     Android



            ,        ,

2011   1   27
API
1.
2.
3.
4.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/
html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
     <script type="text/javascript" src="http://maps.google.com/maps/api/js?
sensor=false">
     </script>
     <script type="text/javascript">
        function initMap(){
           var latlng = new google.maps.LatLng(35.699355, 139.77049);
           var option = {
              zoom: 18,
              center: latlng,
              mapTypeId: google.maps.MapTypeId.ROADMAP,
              streetViewControl: true
           };
           var map = new google.maps.Map(document.getElementById("map"), option);
        }
     </script>
     <title>Hello Street View</title>
  </head>
  <body onload="initMap()">
     <div id="map" style="width:600px;height:400px;"></div>
  </body>
</html>
var latlng = new google.maps.LatLng(35.699355, 139.77049);
var option = {
   zoom: 18,
   center: latlng,
   mapTypeId: google.maps.MapTypeId.ROADMAP,
   streetViewControl: true
};
var map = new google.maps.Map(document.getElementById("map"), option);




                                pegman




 streetViewControll: false              streetViewControll: true
var streetOption = {
  position: latlng, //
     pov: {heading: 45, pitch: 15, zoom: 1} //
};

var div = document.getElementById("street");
var panorama = new google.maps.StreetViewPanorama
 (div, streetOption);
map.setStreetView(panorama);
POV
                                   (                               )
                                                                  POV
                                                             (Point of View)




http://commons.wikimedia.org/wiki/File:Flatiron_fisheye.jpg
var svService = new google.maps.StreetViewService();
svService.getPanoramaByLocation(
   latlng, //
  50, //         (         )
  function(/*StreetViewPanorama*/panorama,
     /*StreetViewStatus*/status){
     //
  });                              (                   null)
POV (                                )
    • heading (       )       API   yaw

    • pitch (     )
    • zoom (              )
                                              pitch


heading
POV
StreetViewPanorama.setPov()

      panorama.setPov({
          heading: 45,
          pitch: 15,
          zoom: 1
      });
StreetViewLink



    StreetViewLink


    StreetViewPanorama
StreetViewPanorama.getLinks()
:


    (   )
google.maps.event.addListener(panorama, 'links_changed', function(){
      if (panorama.getLinks() && 2 == panorama.getLinks().length) {
          for (var i = 0; i < panorama.getLinks().length; i++) {
              if (prevLatLng != panorama.getLinks()[i].pano) {
                  svService.getPanoramaById(panorama.getLinks()[i].pano,
checkLinkDirection(panorama.getPosition(), prevLatLng, panorama.getLinks()[i].pano));
              }
          }
      }
      map.setCenter(panorama.getPosition());
  });
  function checkLinkDirection(_position, _prevLatLng, pano){
      return function(newPanorama, status){
          if (!newPanorama) return;
          var prevAngle = getAngle(_position, _prevLatLng);
          var newAngle = getAngle(newPanorama.location.latLng, _position);
          if (Math.abs(newAngle - prevAngle) < Math.PI * 0.8) {
              prevLatLng = panorama.getPosition();
              panorama.setPov({
                  heading: newAngle * 180.0 / Math.PI,
                  pitch: 0, zoom: 1
              });
              panorama.setPano(pano);
          }
      }
  }
• pano_changed       ID

• position_changed
• pov_changed
• links_changed
• visible_changed
     /
google.maps.event.addListener(
  panorama,
  'links_changed',
  function(){
      //
  });
var marker = new google.maps.Marker({
    position: latLng,
    map: map,
    title: placeName
});
google.maps.event.addListener(
 marker, 'click',
 showMarkerDetail);
var starIcon = new google.maps.MarkerImage('http://www.example.com/
star.png');
var marker = new google.maps.Marker({
    position: new google.maps.LatLng(place.lat, place.lng),
    map: map, icon: starIcon, title: place.label
});
Android
• URL             “google.streetview”



•
        Intent

•
<a href="google.streetview:cbll=35.66307,139.732189">
                                                  !
</a>
<a href="google.streetview:cbll=35.66307,139.732189">
                                                  !
</a>
GeoPoint point = map.getMapCenter();
Uri uri = Uri.parse("google.streetview:cbll="

 
 + point.getLatitudeE6()/1E6

 
 + ","

 
 + point.getLongitudeE6()/1E6);
startActivity(new Intent(Intent.ACTION_VIEW, uri));
Hack         AR




  http://www.sightspacestation.com/
3/10 18:58 , ISS (HTV2, ATV2,       ,
                ,        x2     )       !!
Hack            VR




http://www.youtube.com/watch?v=DG1FWa-0XrE
PC
Google Maps JavaScript API V3
       - Google Maps JavaScript API V3
                - Google Code

http://code.google.com/intl/ja/apis/maps/documentation/
          javascript/services.html#StreetView
Gtug20110307

More Related Content

Viewers also liked

Major league investments october 1 2012 economic and investment update
Major league investments october 1 2012 economic and investment updateMajor league investments october 1 2012 economic and investment update
Major league investments october 1 2012 economic and investment updateFiner Wealth Management, Inc.
 
Bai tap ktqt ban 2011
Bai tap ktqt ban 2011Bai tap ktqt ban 2011
Bai tap ktqt ban 2011Ty Levan
 
Hosea 10 commentary
Hosea 10 commentaryHosea 10 commentary
Hosea 10 commentaryGLENN PEASE
 
FPL'2014 - FlexTiles Workshop - 8 - FlexTiles Demo
FPL'2014 - FlexTiles Workshop - 8 - FlexTiles DemoFPL'2014 - FlexTiles Workshop - 8 - FlexTiles Demo
FPL'2014 - FlexTiles Workshop - 8 - FlexTiles DemoFlexTiles Team
 
Sample Bidcom Presentation - Structural Works 12-28-11
Sample Bidcom Presentation - Structural Works 12-28-11Sample Bidcom Presentation - Structural Works 12-28-11
Sample Bidcom Presentation - Structural Works 12-28-11Allan Leyte
 
How read chest xr 3
How  read  chest xr  3How  read  chest xr  3
How read chest xr 3ANAS ALSOHLE
 
למה לי פילנתרופיה עכשיו
למה לי פילנתרופיה עכשיולמה לי פילנתרופיה עכשיו
למה לי פילנתרופיה עכשיוsheatufim
 
2011美國創新事業規劃研修說明
2011美國創新事業規劃研修說明2011美國創新事業規劃研修說明
2011美國創新事業規劃研修說明基欽 劉
 

Viewers also liked (13)

Major league investments october 1 2012 economic and investment update
Major league investments october 1 2012 economic and investment updateMajor league investments october 1 2012 economic and investment update
Major league investments october 1 2012 economic and investment update
 
Bai tap ktqt ban 2011
Bai tap ktqt ban 2011Bai tap ktqt ban 2011
Bai tap ktqt ban 2011
 
Hosea 10 commentary
Hosea 10 commentaryHosea 10 commentary
Hosea 10 commentary
 
Planos
PlanosPlanos
Planos
 
Abce
AbceAbce
Abce
 
FPL'2014 - FlexTiles Workshop - 8 - FlexTiles Demo
FPL'2014 - FlexTiles Workshop - 8 - FlexTiles DemoFPL'2014 - FlexTiles Workshop - 8 - FlexTiles Demo
FPL'2014 - FlexTiles Workshop - 8 - FlexTiles Demo
 
Миколай - 2017
Миколай - 2017Миколай - 2017
Миколай - 2017
 
Sample Bidcom Presentation - Structural Works 12-28-11
Sample Bidcom Presentation - Structural Works 12-28-11Sample Bidcom Presentation - Structural Works 12-28-11
Sample Bidcom Presentation - Structural Works 12-28-11
 
How read chest xr 3
How  read  chest xr  3How  read  chest xr  3
How read chest xr 3
 
למה לי פילנתרופיה עכשיו
למה לי פילנתרופיה עכשיולמה לי פילנתרופיה עכשיו
למה לי פילנתרופיה עכשיו
 
Kerlap Kerlip 104
Kerlap Kerlip 104Kerlap Kerlip 104
Kerlap Kerlip 104
 
Cheers to 10 years!
Cheers to 10 years! Cheers to 10 years!
Cheers to 10 years!
 
2011美國創新事業規劃研修說明
2011美國創新事業規劃研修說明2011美國創新事業規劃研修說明
2011美國創新事業規劃研修說明
 

More from Mariko Goda

JOSMプラグイン作ってます (SotM Japan 2018 LT)
JOSMプラグイン作ってます (SotM Japan 2018 LT)JOSMプラグイン作ってます (SotM Japan 2018 LT)
JOSMプラグイン作ってます (SotM Japan 2018 LT)Mariko Goda
 
リアルFacebookガジェットを作った(ロングバージョン)
リアルFacebookガジェットを作った(ロングバージョン)リアルFacebookガジェットを作った(ロングバージョン)
リアルFacebookガジェットを作った(ロングバージョン)Mariko Goda
 
リアルFacebookガジェットを作った
リアルFacebookガジェットを作ったリアルFacebookガジェットを作った
リアルFacebookガジェットを作ったMariko Goda
 
pgcafenite3rd ToriSat
pgcafenite3rd ToriSatpgcafenite3rd ToriSat
pgcafenite3rd ToriSatMariko Goda
 

More from Mariko Goda (6)

JOSMプラグイン作ってます (SotM Japan 2018 LT)
JOSMプラグイン作ってます (SotM Japan 2018 LT)JOSMプラグイン作ってます (SotM Japan 2018 LT)
JOSMプラグイン作ってます (SotM Japan 2018 LT)
 
リアルFacebookガジェットを作った(ロングバージョン)
リアルFacebookガジェットを作った(ロングバージョン)リアルFacebookガジェットを作った(ロングバージョン)
リアルFacebookガジェットを作った(ロングバージョン)
 
リアルFacebookガジェットを作った
リアルFacebookガジェットを作ったリアルFacebookガジェットを作った
リアルFacebookガジェットを作った
 
Hide fb apps
Hide fb appsHide fb apps
Hide fb apps
 
Space Hacks
Space HacksSpace Hacks
Space Hacks
 
pgcafenite3rd ToriSat
pgcafenite3rd ToriSatpgcafenite3rd ToriSat
pgcafenite3rd ToriSat
 

Gtug20110307

  • 1.
  • 2. • • Web API • Android • Hack •
  • 3. (@MaripoGoda) • • “ToriSat” • Geo (Android, iOS, Web etc) •
  • 4. iPhone Android , , 2011 1 27
  • 5. API
  • 6. 1.
  • 7. 2.
  • 8. 3.
  • 9. 4.
  • 10.
  • 11. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/ html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src="http://maps.google.com/maps/api/js? sensor=false"> </script> <script type="text/javascript"> function initMap(){ var latlng = new google.maps.LatLng(35.699355, 139.77049); var option = { zoom: 18, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP, streetViewControl: true }; var map = new google.maps.Map(document.getElementById("map"), option); } </script> <title>Hello Street View</title> </head> <body onload="initMap()"> <div id="map" style="width:600px;height:400px;"></div> </body> </html>
  • 12. var latlng = new google.maps.LatLng(35.699355, 139.77049); var option = { zoom: 18, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP, streetViewControl: true }; var map = new google.maps.Map(document.getElementById("map"), option); pegman streetViewControll: false streetViewControll: true
  • 13. var streetOption = { position: latlng, // pov: {heading: 45, pitch: 15, zoom: 1} // }; var div = document.getElementById("street"); var panorama = new google.maps.StreetViewPanorama (div, streetOption); map.setStreetView(panorama);
  • 14.
  • 15. POV ( ) POV (Point of View) http://commons.wikimedia.org/wiki/File:Flatiron_fisheye.jpg
  • 16.
  • 17. var svService = new google.maps.StreetViewService(); svService.getPanoramaByLocation( latlng, // 50, // ( ) function(/*StreetViewPanorama*/panorama, /*StreetViewStatus*/status){ // }); ( null)
  • 18. POV ( ) • heading ( ) API yaw • pitch ( ) • zoom ( ) pitch heading
  • 19. POV StreetViewPanorama.setPov() panorama.setPov({ heading: 45, pitch: 15, zoom: 1 });
  • 20. StreetViewLink StreetViewLink StreetViewPanorama
  • 21.
  • 23. : ( )
  • 24. google.maps.event.addListener(panorama, 'links_changed', function(){ if (panorama.getLinks() && 2 == panorama.getLinks().length) { for (var i = 0; i < panorama.getLinks().length; i++) { if (prevLatLng != panorama.getLinks()[i].pano) { svService.getPanoramaById(panorama.getLinks()[i].pano, checkLinkDirection(panorama.getPosition(), prevLatLng, panorama.getLinks()[i].pano)); } } } map.setCenter(panorama.getPosition()); }); function checkLinkDirection(_position, _prevLatLng, pano){ return function(newPanorama, status){ if (!newPanorama) return; var prevAngle = getAngle(_position, _prevLatLng); var newAngle = getAngle(newPanorama.location.latLng, _position); if (Math.abs(newAngle - prevAngle) < Math.PI * 0.8) { prevLatLng = panorama.getPosition(); panorama.setPov({ heading: newAngle * 180.0 / Math.PI, pitch: 0, zoom: 1 }); panorama.setPano(pano); } } }
  • 25. • pano_changed ID • position_changed • pov_changed • links_changed • visible_changed /
  • 26. google.maps.event.addListener( panorama, 'links_changed', function(){ // });
  • 27.
  • 28. var marker = new google.maps.Marker({ position: latLng, map: map, title: placeName });
  • 30. var starIcon = new google.maps.MarkerImage('http://www.example.com/ star.png'); var marker = new google.maps.Marker({ position: new google.maps.LatLng(place.lat, place.lng), map: map, icon: starIcon, title: place.label });
  • 31. Android • URL “google.streetview” • Intent •
  • 34. GeoPoint point = map.getMapCenter(); Uri uri = Uri.parse("google.streetview:cbll=" + point.getLatitudeE6()/1E6 + "," + point.getLongitudeE6()/1E6); startActivity(new Intent(Intent.ACTION_VIEW, uri));
  • 35. Hack AR http://www.sightspacestation.com/
  • 36. 3/10 18:58 , ISS (HTV2, ATV2, , , x2 ) !!
  • 37. Hack VR http://www.youtube.com/watch?v=DG1FWa-0XrE
  • 38. PC
  • 39. Google Maps JavaScript API V3 - Google Maps JavaScript API V3 - Google Code http://code.google.com/intl/ja/apis/maps/documentation/ javascript/services.html#StreetView