<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>program-shoshinsya</author_name>
  <author_url>https://blog.hatena.ne.jp/program-shoshinsya/</author_url>
  <blog_title>auの日記</blog_title>
  <blog_url>https://program-shoshinsya.hatenablog.com/</blog_url>
  <categories>
    <anon>JavaScript</anon>
  </categories>
  <description>auです。Google Mαpにマーカーを表示させるのですが、必要な情報はデータベースの方に置いてあります。データベースから値を取得→マーカーを設置という順番にしたかったのですが、最初はうまく行きませんでした。 先にマーカーを設置するコードが動いてしまっている状態ですね。これを解消するには、同期処理を行う必要があります。 実際に書いてみる DBからデータを読み込む関数と、マーカーを設置する関数を別々に宣言しています。head要素の中で記述しています。やり方は色々あるようですが、最近は「async・await」を使うのがスマートらしいです。 // DBからデータを取得 // asyncを行頭に書…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fprogram-shoshinsya.hatenablog.com%2Fentry%2F2020%2F07%2F04%2F234130&quot; title=&quot;JavaScriptで同期処理を行う方法 - auの日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-07-04 23:41:30</published>
  <title>JavaScriptで同期処理を行う方法</title>
  <type>rich</type>
  <url>https://program-shoshinsya.hatenablog.com/entry/2020/07/04/234130</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
