{"id":268,"date":"2018-12-09T18:06:12","date_gmt":"2018-12-09T09:06:12","guid":{"rendered":"https:\/\/dalomo.net\/blog\/?p=268"},"modified":"2018-12-09T18:06:12","modified_gmt":"2018-12-09T09:06:12","slug":"%e3%82%b5%e3%83%b3%e3%82%bf%e3%82%92%e5%91%bc%e3%81%b3%e5%af%84%e3%81%9b%e3%82%8b","status":"publish","type":"post","link":"https:\/\/dalomo.net\/blog\/2018\/12\/09\/268\/","title":{"rendered":"\u30b5\u30f3\u30bf\u3092\u547c\u3073\u5bc4\u305b\u308b"},"content":{"rendered":"<p><a href=\"https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2018\/12\/Screenshot_20181209-165750.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-269\" src=\"https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2018\/12\/Screenshot_20181209-165750-145x300.jpg\" alt=\"\" width=\"145\" height=\"300\" srcset=\"https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2018\/12\/Screenshot_20181209-165750-145x300.jpg 145w, https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2018\/12\/Screenshot_20181209-165750-768x1593.jpg 768w, https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2018\/12\/Screenshot_20181209-165750-494x1024.jpg 494w, https:\/\/dalomo.net\/blog\/wp-content\/uploads\/2018\/12\/Screenshot_20181209-165750.jpg 1080w\" sizes=\"auto, (max-width: 145px) 100vw, 145px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/play.google.com\/store\/apps\/details?id=net.dalomo.santaradar\">https:\/\/play.google.com\/store\/apps\/details?id=net.dalomo.santaradar<\/a><\/p>\n<p>\u30b5\u30f3\u30bf\u547c\u3079\u308b\u3088\u3046\u306b\u3059\u308b\u3002\u306a\u3063\u305f\u3051\u3069\u601d\u3063\u3066\u305f\u306e\u3068\u306f\u3061\u3087\u3063\u3068\u3061\u304c\u304f\u306a\u3063\u305f\u3002<\/p>\n<h2>\u30b5\u30f3\u30bf\u547c\u3073<\/h2>\n<h3>\u81ea\u5206\u306e\u4f4d\u7f6e\u304b\u3089\u3007\u3007km\u4ee5\u5185\u306b\u547c\u3076<\/h3>\n<p>\u81ea\u5206\u306e\u4f4d\u7f6e\u306f\u53d6\u5f97\u3057\u3066\u308b\u306e\u3067\u3001\u305d\u3063\u304b\u3089\u8db3\u3057\u5f15\u304d\u3057\u3066\u30b5\u30f3\u30bf\u3092\u51fa\u73fe\u3055\u305b\u308b\u7bc4\u56f2\u3092\u6c7a\u3081\u308b\u3002<a href=\"http:\/\/mononofu.hatenablog.com\/entry\/20090324\/1237894846\">\u3053\u3061\u3089<\/a>\u306b\u3088\u308b\u306831m\u30670.00027778\u307f\u305f\u3044\u300230km\u56db\u65b9\u3050\u3089\u3044\u3067\u3044\u3044\u3084\u3068\u3001\u8db3\u3057\u5f15\u304d\u3059\u308b\u6570\u306f0.277778\u306b\u3057\u305f\u3002<\/p>\n<pre>    public void onClickHorn(View v){\r\n        double latMax, latMin, santaLat;\r\n        double lngMax, lngMin, santaLng;\r\n        double KM_3 = 0.277778;\r\n\r\n        if(lat == 0) {\r\n            Toast.makeText(this, \"\u73fe\u5728\u5730\u304c\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\", Toast.LENGTH_SHORT).show();\r\n            return;\r\n\r\n        }else if{\r\n            Random r = new Random();\r\n            latMax = lat + KM_3;latMin = lat - KM_3;\r\n            lngMax = lng + KM_3;lngMin = lng - KM_3;\r\n            santaLat = latMin + (latMax - latMin) * r.nextDouble();\r\n            santaLng = lngMin + (lngMax - lngMin) * r.nextDouble();\r\n\r\n            mapboxMapm.removeMarker(marker);\r\n            santamll = new LatLng(santaLat,santaLng);\r\n        }\r\n    }<\/pre>\n<p>\u3068\u308a\u3042\u3048\u305a\u547c\u3073\u5bc4\u305b\u308b\u3053\u3068\u306f\u3067\u304d\u305f\u306e\u3060\u3051\u308c\u3069\u3001\u5143\u30b5\u30f3\u30bf\u304c\u6d88\u3048\u3066\u304f\u308c\u306a\u3044\u3002\u306a\u306e\u3067\u3001\u5730\u56f3\u4e0a\u306b\u3069\u3093\u3069\u3093\u30b5\u30f3\u30bf\u304c\u8caf\u307e\u308b\u7fbd\u76ee\u306b\u306a\u3063\u305f\u3002\u3093\u30fc\u3001\u306a\u3093\u3067removemarker\u3057\u3066\u308b\u306e\u306b\u6d88\u3048\u306a\u3044\u3093\u3060\u308d\u306a\u3041\u3002<\/p>\n<p>\u5897\u52a0\u3059\u308b\u306e\u306f\u697d\u3057\u3044\u304b\u3089\u3044\u3044\u3093\u3060\u3051\u3069\u3001\u3053\u3046\u306a\u308b\u3068\u30de\u30fc\u30ab\u30fc\u3092\u30bf\u30c3\u30d7\u3057\u305f\u6642\u306e\u51e6\u7406\u3092\u3069\u3046\u66f8\u3051\u3070\u3044\u3044\u306e\u304b\u5206\u304b\u3089\u306a\u3044\u3002\u3044\u3084\u305d\u3082\u305d\u3082\u5206\u304b\u3089\u306a\u3044\u3093\u3060\u3051\u3069\u3001\u3082\u3063\u3068\u5206\u304b\u3089\u306a\u304f\u306a\u308b\u3002<\/p>\n<p>\u3042\u3001\u3042\u3068\u62e1\u58f0\u5668\u30dc\u30bf\u30f3\u62bc\u3059\u3068\u97f3\u304c\u9cf4\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002\u52b9\u679c\u97f3\u306fSoundPool\u3063\u3066\u3044\u3046\u65b9\u3092\u4f7f\u3046\u3068\u826f\u3044\u307f\u305f\u3044\u3002<\/p>\n<pre>SoundPool soundPool;\r\nint sound;<\/pre>\n<pre>soundPool = new SoundPool(1, AudioManager.STREAM_MUSIC, 0);\r\nsound = soundPool.load(this, R.raw.se_kirakira, 1);<\/pre>\n<pre>soundPool.play(sound,1,1,0,0,1);<\/pre>\n<p>\u3088\u304b\u3088\u304b\u3002<\/p>\n<h3>\u53c2\u8003<\/h3>\n<p><a href=\"https:\/\/qiita.com\/Mocacamo\/items\/1a434c2b25426ffe36b2\">https:\/\/qiita.com\/Mocacamo\/items\/1a434c2b25426ffe36b2<\/a><\/p>\n<p><a href=\"http:\/\/kirakira-soundeffect.com\/index.php\">http:\/\/kirakira-soundeffect.com\/index.php<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/play.google.com\/store\/apps\/details?id=net.dalomo.santaradar \u30b5\u30f3\u30bf\u547c\u3079\u308b\u3088\u3046\u306b\u3059\u308b\u3002\u306a\u3063\u305f\u3051\u3069\u601d\u3063\u3066\u305f\u306e\u3068\u306f\u3061\u3087\u3063\u3068\u3061\u304c\u304f\u306a\u3063\u305f\u3002 \u30b5\u30f3\u30bf\u547c\u3073  &hellip; <a href=\"https:\/\/dalomo.net\/blog\/2018\/12\/09\/268\/\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":269,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[8],"tags":[3,6,4,24],"class_list":["post-268","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-8","tag-android","tag-androidstudio","tag-4","tag-24"],"_links":{"self":[{"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/posts\/268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/comments?post=268"}],"version-history":[{"count":1,"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/posts\/268\/revisions"}],"predecessor-version":[{"id":270,"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/posts\/268\/revisions\/270"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/media\/269"}],"wp:attachment":[{"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/media?parent=268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/categories?post=268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dalomo.net\/blog\/wp-json\/wp\/v2\/tags?post=268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}