マッチングアプリ女「お仕事何してるんですかー?」僕「ドーナツ屋さんで販売してますよ」女「…そうなんですね…」
サイト制作において、アクセスマップなどの地図の表示はどうしてますか?「Google Maps API」を利用したり、ちょっとデザインにこだわりたい時にはイラストに描き起こしたりしてるんじゃないでしょうか。 今回は、Google マップをちょいとカスタマイズすれば、まるでイラストマップみたいに見せることができるんだぜ!というお話です。 記事中に出てくる画像は2012.3現在のもののため、現在のGoogle Maps APIでの表示とは異なりますので注意です…X(。 リンク切れしていたところを、なるべく近い内容の存在するページにリンクし直しました(2015.7.20追記)。 まずはしっかり抑えておきたい「Google Maps APIの基本」から。 基本をすっ飛ばして早速カスタマイズしたい方はこちら↓。 Google Maps APIの基本 Google マップはGoogle API キーを発
バナー広告2案どちらがよいだろう? サインアップのボタンの文言3案はどれが効果が高い? などGoogle Analyticsを使ってコンバージョンレートを簡単に測定できるスクリプトを紹介します。 ABalytics.js -GitHub ABalytics.jsの特徴 ABalytics.jsの使い方 ABalytics.jsの特徴 ABalytics.jsは他のスクリプトに依存せずに動作するJavaScriptで、クライアントサイドでコードを記述するだけで、Google Analyticsを使ったA/Bテストを簡単に実施できます。 サーバーサイドには何も設置する必要はありません。 設置が簡単! 作業はクライアントサイドだけです。 サーバーサイドの準備は何も必要ありません。 データは、Google Analyticsに保存されます。 エレメントのclassを加えるだけで、複数のパターンをテ
この記事は、日経SYSTEMS 8月号に掲載された連載「新野淳一の技術インパクト」第5回のオリジナル原稿をPublickey掲載用に編集したものです。Publickeyでは日経SYSTEMS編集部との合意を得て、雑誌発行から一定期間後に記事をPublickeyに掲載しています。 JavaScriptは1995年の登場から何年にもわたって、Webページにちょっとした動きを与えるための簡易なプログラミング言語とみなされてきた。しかしいまやJavaScriptはモバイル向けアプリケーションの開発、業務アプリケーションのフロントエンド開発、そして大規模なWebアプリケーションのサーバサイドプログラミングなど、あらゆる分野での活用が始まりつつある。最も注目を集め、急速に適用分野を広げて進化しているプログラミング言語だ。 業務システム開発の視点で見れば、今後の開発言語としてJavaScriptが有力候
2012年 6月 13日 新しいサーバーでブログをリニューアルして気がついた、SNSボタンの有無でかなり読み込み速度に差がある。といっても2,3秒ほどですが、これは結構命取りだったりします。 まぁ私もそんなに詳しいわけではないので断言できませんが。 ・訪問者はその数秒でサイトから逃げる ・Googleはその数秒を評価基準に入れる たしか遅延ロード(Lazy Load)とかいう技術ですね。 わりとポピュラーなコードで何とかなったので書いときます。 ピュアなJavaScriptではなく、jQuery使いますね。 方法その1 時限式読み込み body閉じタグの前あたりに書きます。 . . . <div id="snsbox"></div> <script type="text/javascript"> var snscode = 'ここに、SNSのコードを書く' + '一行でつなげても良いが見に
timing: a jQuery plugin JSでのタイマー処理がもっと簡単になるjQueryプラグイン「timing」 setTimeoutやsetIntervalはタイマー関連の関数ですが、沢山使うとどこで何やってるかわかりにくくなって管理がめんどくさいですね。 timingプラグインを使えば、次のように書けば 0.3秒ごとにクラスをつけたり消したりということが可能。これにより文字を点滅させたりする処理が簡単にかけます $('.example1').repeat(300).toggleClass('blink'); repeat は setIntervalにあたり、何度も実行させるメソッドでありますが、setTimeoutの対応としてwaitメソッドがあります。 次のように書けば、0.5秒後にクラスを追加し、その0.2秒後にクラスを削除というような処理が可能です。これをsetTim
gmaps.js ? the easiest way to use Google Maps ストレス無しでGoogleマップを使ったサイトが作れる「gmaps.js」 Googleマップのサイトへの実装が本当に簡単で、かつ多機能なライブラリのご紹介です 簡単なマップを出すのに必要なコードは以下。 表示させるdivと緯度経度を指定するだけです 出来ることリストは以下 マップのクリック、ドラッグ時のイベントハンドラ実装 マーカー付与 ジオロケーション・ジオコーディング マップオーバーレイ マップ上のコンテキストメニュー実装 地図上の区画指定 目的地までのルート描画 静的な画像をマップ表示 などなど超多機能。 Googleマップ使うかもしれない場合は覚えておいて損はありません 関連エントリ Googleマップ関連のjQueryプラグインとチュートリアル集 スマホやタブレットでGoogleマップ風
Google MapのデザインをjQueryで変更する為のメモ書き。Google Map APIとjQueryでGoogle Mapの色合いを変更し、オリジナルのマーカーを付けてみます。こうする事で、既存デザインに合わせたGoogle Mapが出来ます。 今後必要になりそうだったので調べ物をしたついでにメモ書きです。デザインを変更、というと語弊がありますけど、好みの色に変えてみます。 ゴール↓ こんな感じのをjQueryでやろう、みたいな内容です。特に目新しい情報では無いですが。 なんかシャドウ変になっちゃった・・色やマーカーだけでもWebサイトで使用している色にあわせれば地図だけ浮いてしまうような事も無くなるんじゃないかなと思います。 ジオコーディングリクエスト<script type='text/javascript' src='http://ajax.googleapis.com/a
こんにちは、中川です。 今回は「Google JavaScript Style Guide」を気軽にチェックできるClosure Linterをご紹介したいと思います。 http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml Google JavaScript Style Guideのいいところですが、 規約だけでなく、しっかりしたツールも揃っているところが素晴らしいと思います。 コーディング規約はあったとしても、それに従っているか定期的に簡単にチェックする方法がないと、 いつしか守られないまま開発されてしまうことになりますね。 ※今回の内容はMacにて動作確認を行なっています。
今日(2011/5/11)のgoogleロゴはダンスのアニメーションになってて、 それがとてもキレイでかっこいいアニメーションだったので、 自分もアニメーション用のjsをちょこっと書いてみた。 「Google」の6文字が踊る――マーサ・グレアムさん生誕記念のホリデーロゴ この人がロゴのアニメーション作ってた人。 ほんと細部までキレイなアニメーション。このアニメーターのモーション技術すっげぇ。。 んで、googleロゴの中身見てみると、gifアニメかと思いきやpngのポジションをずらす方法を取ってて これがネタばらしの一枚絵。 そういえば、一昨日公開された、thaのFRAMED*のページでも使われてたなぁ、これ。と思い、 普通にjs書ける人には一瞬でできるだろうから関係ないけど、 この1枚絵さえ作れれば、誰でもアニメーションgifならぬ、 アニメーションjpgとか、アニメーションpngつくれ
Twitter, Facebook, Google+, RSSなど、ソーシャルメディアの不揃いなデザインのボタンを統一した美しいデザインにしてブログやサイトに設置するjQueryのプラグインを紹介します。 Koottam Social jQuery Plugin [ad#ad-2] Koottamの主な特徴 Koottamのデモ Koottamの使い方 Koottamの主な特徴 Twitter, Facebook, Google+などのアカウントを設定するだけで設置できます。 7種類のテーマがあり、CSSベースでカスタマイズも可。 カウントの表示はスタティック・アニメーションに対応。 カラーは簡単に変更できます。 より大きいカウント用に省略表記も対応。 MITライセンスのため、あらゆるブログ・サイトに使用しても無料! Koottamのデモ
JavaScriptの書き方はJavaScript自体がある程度自由なためいろいろな書き方ができますが、一貫性を持って書いた方がバグなども発生しにくくなるため、コーディングルールを定めておくのはよいことだと思います(特に複数人の開発の場合) 有名な企業やライブラリはコーディングルールも公開している事が多いので適当にまとめてみました JavaScript style guide – MDC Docs Mozilla/Firefox向けのものなので、一部ECMAScriptの範囲を超えたものも含まれています。 多くの人が見ていると思うので、見たことない人は一度読んでみるといいです。 jscsにこのコーディングルールをチェックするプリセットが用意されています。 Google JavaScript Style Guide Google JavaScript Style Guide 和訳 — Goo
JavaScriptエラー時にエラーを分かりやすく通知してくれるChrome拡張「JavaScript Errors Notifier」 2011年05月10日- JavaScript Errors Notifier - Chrome ウェブストア JavaScriptエラー時にエラーを分かりやすく通知してくれるChrome拡張「JavaScript Errors Notifier」 エラーがあった場合に、アドレスバーの星アイコンのとなりに次のように通知してくれます。 アイコンをクリックすれば具体的なエラー内容が分かるという物。 赤のアイコンでエラー検知が分かりやすくていいですね。 通常の状態ではエラーがあろうと、デベロッパーツール等でコンソールを開いてない限り気づくことは出来ませんが、これは開発者は必須のツールかもしれませんね。 関連エントリ PHPのエラーなんかをブラウザで確認できるC
Chrome版のFirebugことGoogle Chrome Developer Toolsですが、以前gihyoで解説したときよりさらに便利になっているので、少し紹介します(元はWebKitなので、そのうち(近いうちに)Safariでもそれなりに使えるようになるはずです)。 圧縮されたコードの整形 まず、目立つところからいきましょう。ちょうど先日更新されたChromeのdev版(12.0.742.0)に搭載されたばかりの機能で、minifyされているJavaScriptコードを読みやすいように整形して表示してくれるというものです(IE9の開発者ツールにも実装されている機能です)。 例えば、Google Analyticsのコードは圧縮されていて普通は読めません。 しかし、Chromeのデベロッパーツールなら、 このように整形してくれます。 やり方は簡単で、デベロッパーツールのScript
株式会社エイチツーオー・スペース たにぐちまことの日記ブログ前回の連載開始時にアナウンスし忘れましたが、builder by ZD Netに『あなたがプログラムを理解できない10の理由:第2回』が掲載されました。 今回は・・・ 理数系の頭脳が必要だと思っている 入門書を探し続けている の2つ。思い当たる方は、是非読んでみていただけると幸いです。 » あなたがプログラムを理解できない10の理由:第2回 - builder by ZDNet Japan Googleリーダーに面白い機能が追加されました。 「Notes」というこの新機能は、気になった記事にメモを残して、他の人たちと共有することができます。 これまでも「Share」という機能で、気になった記事を共有することができましたが、Notesではこれに一言メモを残すことができるイメージです。しかし、Notesの機能はそれ以上に面白い機能を追
CMでやってるChromeの紹介ムービーをなにげなく見てたら、ちょっとおかしいことに気づきました。最先端ブラウザであるChromeの、その紹介サイトとなれば当然HTML5対応してるはず、と思ってみて気づいた点です。 HTMLソースを眺めてみて、気づきました。これがナウいソースなのかと関心する点が多々ありますが、2点、すげぇ!と思ったところがあるので紹介します。 1.Google Analyticsのタグが最新版を超えてる GAの貼り付けタグが公式のものではないことがまず1点目の違和感です。通常はこんな感じでゴチャゴチャしてるんですが //before <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXXXXX-1']); _gaq.push(['_trackPag
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く