<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>xyk</author_name>
  <author_url>https://blog.hatena.ne.jp/xyk/</author_url>
  <blog_title>xyk blog</blog_title>
  <blog_url>https://xyk.hatenablog.com/</blog_url>
  <categories>
    <anon>ios</anon>
    <anon>swift</anon>
    <anon>mapView</anon>
  </categories>
  <description>検証環境: Xcode 12.4 Swift 5.3.2 iOS Deployment Target 14.4 マップ(MKMapView)を表示してピンを立てるだけの簡単な実装例。 マップビューにピンを追加するには、MKAnnotationプロトコルを適合したクラスを用意して、位置情報CLLocationCoordinate2Dを設定する。 そしてそのアノテーションをマップビューに追加すればよい。 以下サンプルでは、デフォルトで用意されているアノテーションクラスのMKPointAnnotationを使用し、マップ上で長押しした地点にピンを立てるようにした。 import UIKit impo…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fxyk.hatenablog.com%2Fentry%2F2021%2F04%2F08%2F120920&quot; title=&quot;マップ(MKMapView)上にピンを立てる - xyk blog&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>https://cdn-ak.f.st-hatena.com/images/fotolife/x/xyk/20210408/20210408120838.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-04-08 12:09:20</published>
  <title>マップ(MKMapView)上にピンを立てる</title>
  <type>rich</type>
  <url>https://xyk.hatenablog.com/entry/2021/04/08/120920</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
