1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

google map javascriptをtailwindcssで表示する

Posted at

##google map apiの導入法

①google cloud platformに登録

②api keyを取得してscriptタグに埋め込む

③tailwind cssでサイズを指定する

##widthとheightを指定する

~blade.php
<div class="w-full h-full" id="map">

</div>

これでは表示されません。

##対策

~blade.php
<div class="w-full h-screen" id="map">

</div>

これで無事divタグの中に表示されるようになりました。

※api keyを埋め込んだままgitにpushするとアプリによっては情報漏洩で
悪用されるリスクがあるので注意です。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?