Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

GeoTechTalk InkSatogaeri Project

1,571 views

Published on

GTUG Geo TechTalk
 インクカートリッジ里帰りプロジェクトの地図検索機能における
業務適用事例

Published in: Technology, News & Politics
  • Be the first to comment

  • Be the first to like this

GeoTechTalk InkSatogaeri Project

  1. 1. 2011/3/7 Google
  2. 2. ■ ■ ABC ■ / / /6 ( 3639 )
  3. 3. http://www.inksatogaeri.jp/
  4. 4. http://www.inksatogaeri.jp/
  5. 5. http://www.inksatogaeri.jp/
  6. 6. http://www.inksatogaeri.jp/
  7. 7. GeoLocationAPI GeoLocationAPIIf(navigator.geolocation){// wid = navigator.geolocation.watchPosition(update);}
  8. 8. GeoLocationAPI GeoLocationAPI If(navigator.geolocation){// wid = navigator.geolocation.watchPosition(update); } Androidif(!navigator.geolocation) navigator.geolocation = google.gears.factory.create(beta.geolocation);
  9. 9. GeoLocationAPI GeoLocationAPI If(navigator.geolocation){// wid = navigator.geolocation.watchPosition(update); } Androidif(!navigator.geolocation) navigator.geolocation = google.gears.factory.create(beta.geolocation);//function update(position){ var lat = position.coords.latitude; var lng = position.coords.longitude; var currentPos = new google.maps.LatLng(lat, lng); map.setCenter(currentPos); // navigator.geolocation.clearWatch(wid);}
  10. 10. Data Get var httpObj = createHttpRequest(); httpObj.open("GET",url,true); httpObj.onreadystatechange = function() { if (httpObj.readyState == 4 && httpObj.status == 200){ if(httpObj.responseText != ""){ obj = eval("("+httpObj.responseText+")"); } } httpObj.send(null); }$(function() { $.getJSON("data.json",function(obj){ hoge(obj); });});
  11. 11. GeoCoding // var gc = new google.maps.Geocoder(); gc.geocode({ address : adrs }, function(results, status){ if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); }else{ alert(status+" : "); } });
  12. 12. StreetView // var svp = new google.maps.StreetViewPanorama( document.getElementById("streetview"), { position : new google.maps.LatLng(lat,lng) } ); if(svp.getVisible()){ map.setStreetView(svp); }
  13. 13. Directions//var directionsRenderer = new google.maps.DirectionsRenderer(rendererOptions);directionsRenderer.setMap(map);var request = { origin: point1, destination: point2, travelMode: google.maps.DirectionsTravelMode.WALKING};var directionsService = new google.maps.DirectionsService();directionsService.route(request, function(result, status){ if (status == google.maps.DirectionsStatus.OK) { directionsRenderer.setDirections(result); }});
  14. 14. Tips // function clearOverlays() { if (markersArray) { for (i in markersArray) { markersArray[i].setMap(null); } } } markersArray.push(marker);//infoWindowgoogle.maps.event.addListener(marker, "click", function() { infowindow = new google.maps.InfoWindow({ content: html }); if (currentInfoWindow) { currentInfoWindow.close(); } infowindow.open(map, marker); currentInfoWindow = infowindow; });
  15. 15. Tips CharsetInfowindowCharset HTML window.parent.document.form. V2 V3
  16. 16. Tips//For Clientrc = map.getBounds();mapArea = rc.getSouthWest() +","+rc.getNorthEast();var url = "http://hoge/fuga.php?ll="+mapArea+"&cache="+(new Date()).getTime();var httpObj = createHttpRequest();httpObj.open("GET",url,true);httpObj.send(null); NE(lat,lng) SW(lat,lng)
  17. 17. Tips//For Clientrc = map.getBounds();mapArea = rc.getSouthWest() +","+rc.getNorthEast();var url = "http://hoge/fuga.php?ll="+mapArea+"&cache="+(new Date()).getTime();var httpObj = createHttpRequest();httpObj.open("GET",url,true);httpObj.send(null);//For Server$sql = "SELECT * FROM hoge where ((lat BETWEEN $swlat and $nelat) and (lng BETWEEN $swlng and $nelng))"; NE(lat,lng) SW(lat,lng)
  18. 18. Tips URL → → → → Server→Network→Browser
  19. 19. MashupAward MashupAward6 API GoogleMaps → → → or API → → Data API
  20. 20. RememberBox http://ibox.geo.jp/
  21. 21. RememberBox http://ibox.geo.jp/ ♪
  22. 22. RememberBox http://ibox.geo.jp/ OAuth Twitter ! ♪
  23. 23. RememberBox http://ibox.geo.jp/ OAuth Twitter ! Box ♪
  24. 24. Thanks a lot !

×