<br />
<b>Warning</b>:  The magic method SFML_Singleton::__wakeup() must have public visibility in <b>/home/public/wp-content/plugins/sf-move-login/inc/classes/class-sfml-singleton.php</b> on line <b>72</b><br />
{"id":279,"date":"2019-04-25T12:08:05","date_gmt":"2019-04-25T18:08:05","guid":{"rendered":"http:\/\/www.munderwood.ca\/?p=279"},"modified":"2019-04-25T12:08:05","modified_gmt":"2019-04-25T18:08:05","slug":"measuring-distances-on-leaflet-maps-in-vue","status":"publish","type":"post","link":"https:\/\/www.munderwood.ca\/index.php\/2019\/04\/25\/measuring-distances-on-leaflet-maps-in-vue\/","title":{"rendered":"Measuring distances on Leaflet maps in Vue applications"},"content":{"rendered":"<p><a href=\"https:\/\/korigan.github.io\/Vue2Leaflet\">Vue2Leaflet<\/a>\u00a0is a great library that provides a very straightforward approach to using <a href=\"https:\/\/leafletjs.com\/\">Leaflet<\/a> maps in <a href=\"https:\/\/vuejs.org\/\">Vue<\/a> applications. <a href=\"https:\/\/ppete2.github.io\/Leaflet.PolylineMeasure\/\">Leaflet.PolylineMeasure<\/a> is a great Leaflet plugin that adds a tool to allow the user to measure distances along (poly)lines by drawing them on top of the map.<\/p>\n<p>Today I released the initial version of a Vue2Leaflet plugin to provide a simple wrapper of the polyline measurement tool as a Vue2Leaflet plugin, via the\u00a0<a href=\"https:\/\/github.com\/mikeu\/vue2-leaflet-polyline-measure\">vue2-leaflet-polyline-measure<\/a> component. Usage is simple:<\/p>\n<pre class=\"lang:xhtml decode:true\">&lt;l-map&gt;\r\n  &lt;l-polyline-measure :options=\"{ showUnitControl: true }\" position=\"bottomright\"\/&gt;\r\n  &lt;!-- other map components --&gt;\r\n&lt;\/l-map&gt;<\/pre>\n<p>The <span class=\"lang:default decode:true  crayon-inline \">options<\/span>\u00a0 object is passed directly to the underlying library, so can be any of the <a href=\"https:\/\/github.com\/ppete2\/Leaflet.PolylineMeasure#default-options\">polyline measurement options<\/a>. The <span class=\"lang:default decode:true  crayon-inline \">position<\/span>\u00a0 parameter places the control in a corner of the map based on the available <a href=\"https:\/\/leafletjs.com\/reference-1.4.0.html#control-position\">Leaflet control options<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Vue2Leaflet\u00a0is a great library that provides a very straightforward approach to using Leaflet maps in Vue applications. Leaflet.PolylineMeasure is a great Leaflet plugin that adds a tool to allow the user to measure distances along (poly)lines by drawing them on top of the map. Today I released the initial version of a Vue2Leaflet plugin to &#8230; <span class=\"more\"><a class=\"more-link\" href=\"https:\/\/www.munderwood.ca\/index.php\/2019\/04\/25\/measuring-distances-on-leaflet-maps-in-vue\/\">[Read more&#8230;]<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[20,19],"_links":{"self":[{"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/posts\/279"}],"collection":[{"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/comments?post=279"}],"version-history":[{"count":4,"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/posts\/279\/revisions"}],"predecessor-version":[{"id":283,"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/posts\/279\/revisions\/283"}],"wp:attachment":[{"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/media?parent=279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/categories?post=279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.munderwood.ca\/index.php\/wp-json\/wp\/v2\/tags?post=279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}