{"id":19930,"date":"2018-01-02T12:15:09","date_gmt":"2018-01-02T10:15:09","guid":{"rendered":"https:\/\/www.webcodegeeks.com\/?p=19930"},"modified":"2018-01-02T10:33:13","modified_gmt":"2018-01-02T08:33:13","slug":"leaflet-fit-polyline-view","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/","title":{"rendered":"Leaflet: Fit polyline in view"},"content":{"rendered":"<p>I\u2019ve been playing with the <a href=\"http:\/\/leafletjs.com\/reference-1.2.0.html\">Leaflet.js<\/a> library over the Christmas holidays to visualise running routes drawn onto the map using a Polyline and I wanted to zoom the map the right amount to see all the points.<\/p>\n<h2>Pre requisites<\/h2>\n<p>We have the following HTML to define the <cite>div<\/cite> that will contain the map.<\/p>\n<pre class=\"brush:xml\">&lt;div id=\"container\"&gt;\r\n\t&lt;div id=\"map\" style=\"width: 100%; height: 100%\"&gt;\r\n\t&lt;\/div&gt;\r\n&lt;\/div&gt;<\/pre>\n<p>We also need to import the following Javascript and CSS files:<\/p>\n<pre class=\"brush:xml\">&lt;script src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7\/leaflet.js\"&gt;&lt;\/script&gt;\r\n  &lt;script type=\"text\/javascript\" src=\"https:\/\/rawgit.com\/jieter\/Leaflet.encoded\/master\/Polyline.encoded.js\"&gt;&lt;\/script&gt;\r\n  &lt;link rel=\"stylesheet\" href=\"http:\/\/cdn.leafletjs.com\/leaflet-0.7\/leaflet.css\"\/&gt;\r\n\u00a0\r\n  &lt;link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/leaflet.draw\/0.4.2\/leaflet.draw.css\"\/&gt;\r\n  &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/leaflet.draw\/0.4.2\/leaflet.draw.js\"&gt;&lt;\/script&gt;<\/pre>\n<h2>Polyline representing part of a route<\/h2>\n<p>The following code creates a polyline for a <a href=\"https:\/\/www.strava.com\/segments\/15311748\">Strava segment<\/a> that I often run.<\/p>\n<pre class=\"brush:js\">var map = L.map('map');\r\nL.tileLayer('http:\/\/{s}.tile.openstreetmap.org\/{z}\/{x}\/{y}.png', {maxZoom: 18,}).addTo(map);\r\n\u00a0\r\nvar rawPoints = [\r\n  { \"latitude\": 51.357874010145395, \"longitude\": -0.198045110923591 },\r\n  { \"latitude\": 51.3573858289394, \"longitude\": -0.19787754933584795 },\r\n  { \"latitude\": 51.35632791810057, \"longitude\": -0.19750254941422557 },\r\n  { \"latitude\": 51.35553240304241, \"longitude\": -0.197232163894512 },\r\n  { \"latitude\": 51.35496267279901, \"longitude\": -0.1970247338143316 },\r\n  { \"latitude\": 51.35388700570004, \"longitude\": -0.19666483094752069 },\r\n  { \"latitude\": 51.3533898352570, \"longitude\": -0.1964976504847828 },\r\n  { \"latitude\": 51.35358452733139, \"longitude\": -0.19512563906602554 },\r\n  { \"latitude\": 51.354762877995036, \"longitude\": -0.1945622934585907 },\r\n  { \"latitude\": 51.355610110109986, \"longitude\": -0.19468697186046677 },\r\n  { \"latitude\": 51.35680377680643, \"longitude\": -0.19395063336295112 },\r\n  { \"latitude\": 51.356861596801075, \"longitude\": -0.1936180154828497 },\r\n  { \"latitude\": 51.358487396611125, \"longitude\": -0.19349660642888197 }\r\n];\r\n\u00a0\r\nvar coordinates = rawPoints.map(rawPoint =&gt; new L.LatLng(rawPoint[\"latitude\"], rawPoint[\"longitude\"]))\r\n\u00a0\r\nlet polyline = L.polyline(\r\n    coordinates,\r\n    {\r\n        color: 'blue',\r\n        weight: 3,\r\n        opacity: .7,\r\n        lineJoin: 'round'\r\n    }\r\n);\r\n\u00a0\r\npolyline.addTo(map);<\/pre>\n<p>I wanted to centre the map around the polyline and initially wrote the following code to do this:<\/p>\n<pre class=\"brush:js\">let lats = rawPoints.map(c =&gt; c.latitude).reduce((previous, current) =&gt; current += previous, 0.0);\r\nlet longs = rawPoints.map(c =&gt; c.longitude).reduce((previous, current) =&gt; current += previous, 0.0);\r\n\u00a0\r\nconst position = [lats \/ rawPoints.length, longs \/ rawPoints.length];\r\nmap.setView(position, 17);<\/pre>\n<p>This works fine but the zoom factor was wrong when I drew longer polylines so I needed a better solution.<\/p>\n<p>I should have <a href=\"http:\/\/leafletjs.com\/reference-1.2.0.html#polyline\">RTFM<\/a> because there\u2019s a much simpler way to do this. I actually found the explanation in <a href=\"https:\/\/github.com\/Leaflet\/Leaflet\/issues\/360\">a GitHub issue from 2011<\/a>! We can replace the previous snippet with this single line of code:<\/p>\n<pre class=\"brush:js\">map.fitBounds(polyline.getBounds());<\/pre>\n<p>And this is how it looks on the screen:<\/p>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2018\/01\/2017-12-31_17-30-25.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-19932\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2018\/01\/2017-12-31_17-30-25.png\" alt=\"\" width=\"426\" height=\"328\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2018\/01\/2017-12-31_17-30-25.png 426w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2018\/01\/2017-12-31_17-30-25-300x231.png 300w\" sizes=\"(max-width: 426px) 100vw, 426px\" \/><\/a><\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>Published on Web Code Geeks with permission by Mark Needham, partner at our <a href=\"http:\/\/www.webcodegeeks.com\/join-us\/wcg\/\" target=\"_blank\" rel=\"noopener\">WCG program<\/a>. See the original article here: <a href=\"http:\/\/www.markhneedham.com\/blog\/2017\/12\/31\/leaflet-fit-polyline-view\/\" target=\"_blank\" rel=\"noopener\">Leaflet: Fit polyline in view<\/a><\/p>\n<p>Opinions expressed by Web Code Geeks contributors are their own.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I\u2019ve been playing with the Leaflet.js library over the Christmas holidays to visualise running routes drawn onto the map using a Polyline and I wanted to zoom the map the right amount to see all the points. Pre requisites We have the following HTML to define the div that will contain the map. &lt;div id=&#8221;container&#8221;&gt; &hellip;<\/p>\n","protected":false},"author":48,"featured_media":920,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-19930","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Leaflet: Fit polyline in view - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"I\u2019ve been playing with the Leaflet.js library over the Christmas holidays to visualise running routes drawn onto the map using a Polyline and I wanted to\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Leaflet: Fit polyline in view - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"I\u2019ve been playing with the Leaflet.js library over the Christmas holidays to visualise running routes drawn onto the map using a Polyline and I wanted to\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2018-01-02T10:15:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Mark Needham\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mark Needham\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/\"},\"author\":{\"name\":\"Mark Needham\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/848a54e2ee724e46069ce36c2e52e98e\"},\"headline\":\"Leaflet: Fit polyline in view\",\"datePublished\":\"2018-01-02T10:15:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/\"},\"wordCount\":209,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg\",\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/\",\"name\":\"Leaflet: Fit polyline in view - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg\",\"datePublished\":\"2018-01-02T10:15:09+00:00\",\"description\":\"I\u2019ve been playing with the Leaflet.js library over the Christmas holidays to visualise running routes drawn onto the map using a Polyline and I wanted to\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Leaflet: Fit polyline in view\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/848a54e2ee724e46069ce36c2e52e98e\",\"name\":\"Mark Needham\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5489baed26ce2d932bf951ecfb47afe80bec45d3648c23521d87c83b8f1c3ea9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5489baed26ce2d932bf951ecfb47afe80bec45d3648c23521d87c83b8f1c3ea9?s=96&d=mm&r=g\",\"caption\":\"Mark Needham\"},\"sameAs\":[\"http:\/\/www.markhneedham.com\/blog\/\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/mark-needham\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Leaflet: Fit polyline in view - Web Code Geeks - 2026","description":"I\u2019ve been playing with the Leaflet.js library over the Christmas holidays to visualise running routes drawn onto the map using a Polyline and I wanted to","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/","og_locale":"en_US","og_type":"article","og_title":"Leaflet: Fit polyline in view - Web Code Geeks - 2026","og_description":"I\u2019ve been playing with the Leaflet.js library over the Christmas holidays to visualise running routes drawn onto the map using a Polyline and I wanted to","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2018-01-02T10:15:09+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg","type":"image\/jpeg"}],"author":"Mark Needham","twitter_card":"summary_large_image","twitter_creator":"@webcodegeeks","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Mark Needham","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/"},"author":{"name":"Mark Needham","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/848a54e2ee724e46069ce36c2e52e98e"},"headline":"Leaflet: Fit polyline in view","datePublished":"2018-01-02T10:15:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/"},"wordCount":209,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg","articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/","name":"Leaflet: Fit polyline in view - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg","datePublished":"2018-01-02T10:15:09+00:00","description":"I\u2019ve been playing with the Leaflet.js library over the Christmas holidays to visualise running routes drawn onto the map using a Polyline and I wanted to","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/javascript\/leaflet-fit-polyline-view\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/"},{"@type":"ListItem","position":3,"name":"Leaflet: Fit polyline in view"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/848a54e2ee724e46069ce36c2e52e98e","name":"Mark Needham","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5489baed26ce2d932bf951ecfb47afe80bec45d3648c23521d87c83b8f1c3ea9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5489baed26ce2d932bf951ecfb47afe80bec45d3648c23521d87c83b8f1c3ea9?s=96&d=mm&r=g","caption":"Mark Needham"},"sameAs":["http:\/\/www.markhneedham.com\/blog\/"],"url":"https:\/\/www.webcodegeeks.com\/author\/mark-needham\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/19930","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/48"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=19930"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/19930\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/920"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=19930"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=19930"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=19930"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}