{"id":3155,"date":"2023-06-08T10:43:33","date_gmt":"2023-06-08T14:43:33","guid":{"rendered":"https:\/\/michaelrowe01.com\/?p=3155"},"modified":"2023-06-08T10:43:51","modified_gmt":"2023-06-08T14:43:51","slug":"meet-mapkit-for-swiftui","status":"publish","type":"post","link":"https:\/\/michaelrowe01.com\/index.php\/blog\/meet-mapkit-for-swiftui\/","title":{"rendered":"Meet MapKit for SwiftUI"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"660\" height=\"371\" data-attachment-id=\"3156\" data-permalink=\"https:\/\/michaelrowe01.com\/index.php\/blog\/meet-mapkit-for-swiftui\/attachment\/%ef%a3%bfwwdc23-19\/\" data-orig-file=\"https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-19.png?fit=1920%2C1080&amp;ssl=1\" data-orig-size=\"1920,1080\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"\uf8ffWWDC23-19\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-19.png?fit=660%2C371&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-19.png?resize=660%2C371&#038;ssl=1\" alt=\"\" class=\"wp-image-3156\" srcset=\"https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-19.png?resize=1024%2C576&amp;ssl=1 1024w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-19.png?resize=300%2C169&amp;ssl=1 300w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-19.png?resize=768%2C432&amp;ssl=1 768w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-19.png?resize=1536%2C864&amp;ssl=1 1536w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-19.png?w=1920&amp;ssl=1 1920w, https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2023\/06\/%EF%A3%BFWWDC23-19.png?w=1320&amp;ssl=1 1320w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Expanded swiftUI API<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use MapKit to your app,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is a code along class. &nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Adding a marker to a Map, is like adding a view to al list. &nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Markers are used to display content on a map.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Annotation allows your to provide a view at a specific location<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using the content builder closure allows you to put things on the map.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can use .mapStyle to change the display of the map, &nbsp; .standard map is like a paper map.&nbsp; Adding elevation: .realistic the map will be able to handle terrain information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Search results can be shown on the map.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MKLocalSerach will find places near the coordinates you provide.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Map Items can use automatically color and style results, you can override and provide your own image or even three letters of text.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What the map shows is controlled by a .MapCamera (explicit) or a .MapCameraPosition (dynamic)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you provide a binding to the position state, MapKit will update based on the user\u2019s position.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">.onMapCameraChange informs us when there is a change to what is made visible.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Look around Preview pulls in a scene based on MKLookARoundSceneRequest which will return a look around<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MapPolyline can be used to show a driving route.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MapPolygon and MapCircle can be used to mark areas on the map.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MapUserLocationButton() will show where the user is<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MapCompass() will show the compass on the map<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MapScaleView() will show on the screen to show zoom level.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you use MapControls Modifier they will be placed in default places.&nbsp; But since they just views, you can place them where you want them in your own position of the app.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Expanded swiftUI API Use MapKit to your app, This is a code along class. &nbsp; Adding a marker to a Map, is like adding a view to al list. &nbsp; Markers are used to display content on a map. Annotation allows your to provide a view at a specific location Using the content builder closure [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_wp_convertkit_post_meta":{"form":"-1","landing_page":"0","tag":"0","restrict_content":"0"},"hide_page_title":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[2,3],"tags":[712,527,680],"class_list":["post-3155","post","type-post","status-publish","format-standard","hentry","category-blog","category-personal-softwareandit","tag-mapkit","tag-swiftui","tag-wwdc23"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2aMa8-OT","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts\/3155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/comments?post=3155"}],"version-history":[{"count":1,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts\/3155\/revisions"}],"predecessor-version":[{"id":3157,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts\/3155\/revisions\/3157"}],"wp:attachment":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/media?parent=3155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/categories?post=3155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/tags?post=3155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}