Giter VIP home page Giter VIP logo

demo-gmapjs-api's Introduction

Googleマップをウェブページで利用する方法

現状では、マップ上でのスクロールを許可しない場合はAPIを、
スクロールを許可する場合はインラインフレームを使うのが楽だと思います。

私個人としては、APIでスクロール無効に設定して使うのが気に入っています。


デモ

http://sutara79.github.io/demo-gmapjs-api


関連ページ


ある住所をJavaScript APIで表示する方法

住所の緯度経度を取得

下記の2つの方法があります。

  • Geocoding - 住所から緯度経度を検索
  • GoogleマップのURLのパラメータから抜き出す。
    たとえば、Googleマップで「小倉城」と検索した場合、下記のようなURLになります。
    https://www.google.com/maps/place/%E5%B0%8F%E5%80%89%E5%9F%8E/@33.8831353,130.8755638,17z/data=!4m5!3m4!1s0x3543b8ad94500c23:0x1307eedef77d6d68!8m2!3d33.884431!4d130.874261?hl=ja
    @33.8831353,130.8755638は画面の中心となる座標であって、小倉城の座標ではありません。
    末尾にある!3d33.884431!4d130.874261のうち、 !3d!4dを取り除いたものが、小倉城の座標です。
    (緯度:33.884431、経度:130.874261)

関連ブログ記事

demo-gmapjs-api's People

Contributors

sutara79 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.