{"id":3899,"date":"2014-05-21T03:19:56","date_gmt":"2014-05-21T03:19:56","guid":{"rendered":"http:\/\/szapp.com\/?p=104"},"modified":"2014-05-21T03:19:56","modified_gmt":"2014-05-21T03:19:56","slug":"fun-with-maps-marker-pro","status":"publish","type":"post","link":"https:\/\/wsbj.com\/sorabji\/2014\/05\/21\/fun-with-maps-marker-pro.html","title":{"rendered":"Fun With Maps Marker Pro"},"content":{"rendered":"<p>\t\t\t\tThis turned into a shit show. I mean, this is what Szapp.Com is about: documenting the amount of time wasted on stuff that just does not work as specified.<\/p>\n<p>The <a href=\"http:\/\/www.mapsmarker.com\/\" target=\"_blank\">Maps Marker Pro plugin for WordPress<\/a> (which I expect to purchase\u00a0after getting to know it better during the free 30-day trial) is the most beautiful and comprehensive mapping plugin for WordPress.\u00a0While most mapping plugins have a singular bias toward Google Maps the Maps Marker Pro (a.k.a. &#8220;L<span style=\"color: #444444\">eaflet Maps Marker&#8221;)\u00a0<\/span>allows mapping from OpenSourceMaps, Bing. MapQuest, and others. It&#8217;s a quality product but not without its timesucking documentation perils.<\/p>\n<p>Drawn by the promise of importing GPS tracks directly from KML (Keyhole Markup Language) files I spent ludicrous amounts of time searching and clicking and hunting and pecking for where this support was to be found. I could not for the life of me figure out where the option to import KML files existed. All I could find is support for the GPX, CSV, XLS, and XLSX formats, though the FAQ clearly stated &#8220;<span style=\"color: #545454\">Can I\u00a0<\/span><span style=\"color: #545454\">import<\/span><span style=\"color: #545454\">\u00a0markers via CSV or\u00a0<\/span><span style=\"color: #545454\">KML<\/span><span style=\"color: #545454\">? Yes, this feature is available since\u00a0<\/span><span style=\"color: #545454\">Maps Marker Pro<\/span><span style=\"color: #545454\">\u00a0v1.4&#8243;<\/span>\u00a0(The plugin is now at version 1.6). I\u00a0opened a support ticket and looked forward to a reply, whilst clicking and searching and hunting for this feature. It was 5am in the country where the software is developed so I didn&#8217;t expect an immediate reply.<\/p>\n<p>A reply did come quickly enough, though, and to the credit of its author the claim that KML files can be imported directly into Maps Marker Pro has been removed from the web site&#8217;s FAQ. I was also offered a 20% discount should I choose to purchase the plugin. I think that adds up to about eight bucks, or about one dollar for every hour I spent staring at this.<\/p>\n<p>Whilst waiting the above reply\u00a0response I found myself in mental limbo,\u00a0questioning my general intelligence in trying to get KML converted to CSV or anything else natively supported by Maps Marker Pro.<\/p>\n<p>Simply opening the KML file in Excel and saving it as CSV should have solved the problem, but for some reason Maps Marker Pro complained that the column headings either did not exist or were invalid.<\/p>\n<p>The next likeliest route should have been <a href=\"http:\/\/www.gpsbabel.org\/\" target=\"_blank\">GPSBabel<\/a>, a software I remember\u00a0downloading years ago\u00a0but which I can&#8217;t recall successfully using. The first times I attempted to convert from KML to GPX I was treated to insouciant error messages that I wish I could remember. I forgot to note them but I think they ended with &#8220;error Message 1&#8221; or &#8220;error condition 1&#8221;. After a reboot GPSBabel\u00a0was able to convert KML to GPX but it only showed start and end points, failing to\u00a0illustrate tracks (as shown in the successful result below).<\/p>\n<p>Another promising piece of software &#8212; the <a href=\"http:\/\/choonchernlim.com\/kmlcsv\/\" target=\"_blank\">KMLCSV converter<\/a> &#8212; failed to start after complaining that I had no JRE (Java Runtime Environment) installed in its path.<\/p>\n<div id=\"attachment_107\" style=\"width: 507px\" class=\"wp-caption alignnone\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-107\" class=\"size-full wp-image-107\" src=\"https:\/\/i0.wp.com\/wsbj.com\/sorabji\/wp-content\/uploads\/2014\/05\/kmlcsv_javaw.jpg?resize=497%2C273&#038;ssl=1\" alt=\"KMLCSV Java Runtime Environment must be available\" width=\"497\" height=\"273\" \/><p id=\"caption-attachment-107\" class=\"wp-caption-text\">KMLCSV Java Runtime Environment must be available<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>Of course I have a current version of the JRE installed, but KMLCSV\u00a0for some reason wants it installed in its own directory. Older version of Java are available for download (KMLCSV wanted version 1.6 or newer, suggesting it does not work with the most modern\u00a0versions) but those legacy Java platforms\u00a0are notoriously bad news.<\/p>\n<p>Sticking with a modern version of Java\u00a0I copied over the &#8220;jre7&#8221; folder from the Java directory, renamed it to &#8220;jre&#8221; and got a new complaint:<\/p>\n<div id=\"attachment_106\" style=\"width: 496px\" class=\"wp-caption alignnone\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-106\" class=\"size-full wp-image-106\" src=\"https:\/\/i0.wp.com\/wsbj.com\/sorabji\/wp-content\/uploads\/2014\/05\/kmlcsv_jvmdll.jpg?resize=486%2C212&#038;ssl=1\" alt=\"Failed to load the .INI shared library jvm.dll\" width=\"486\" height=\"212\" \/><p id=\"caption-attachment-106\" class=\"wp-caption-text\">Failed to load the .INI shared library jvm.dll<\/p><\/div>\n<p>I thought this KMLCSV Converter might simply have required a reboot (it did not work after reboot, which I did not perform until the next day) but in lieu of that\u00a0I looked for solutions in a text-parsing language I could trust: Perl. Ultimately this worked but, of course, it was\u00a0not without its perils &#8212; I was unable to install the\u00a0DateTime::Format::HTTP module on my preferred dedicated server, so I had to do it on another.\u00a0Nevertheless,\u00a0from one <a href=\"http:\/\/onohiroki.cycling.jp\/index.html.en\" target=\"_blank\">ONO HIROKI&#8217;s web pages<\/a> comes a <a href=\"http:\/\/onohiroki.cycling.jp\/comp-google-latitude\" target=\"_blank\">blessedly simple script to convert KML to CSV<\/a>. This rant is not meant to\u00a0pronounce\u00a0that\u00a0Perl is\u00a0a preferred route for this task (though text-strangling such as this is precisely where the Practical Extraction and Reporting Language\u00a0shines) but to document\u00a0the time wasted staring at erroneously\u00a0documented plugins\u00a0and software applications\u00a0that seem to work for everyone but me.<\/p>\n<p>Now I am up and running with maps, maps, maps to come. <a href=\"http:\/\/maps.sorabji.com\/maps\/july-9-2011.html\">Here is a first one showing my 7.71 mile walk\u00a0through Queens<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #444444\"><style type=\"text\/css\">#map_1 {clear: both; padding: 0px; margin: 0px; border: 0px; width: 100%; height: 100%; margin-top:0px; margin-right:0px;margin-left:0px; margin-bottom:0px; left: 0px; border-radius:0px;\nbox-shadow: none;}#map_1 img{clear: both; padding: 0px; margin: 0px; border: 0px; width: 100%; height: 100%; position: absolute; margin-top:0px; margin-right:0px;margin-left:0px; margin-bottom:0px; border-radius:0px;\nbox-shadow: none;}<\/style><div id=\"map_1\" class=\"OSM_Map\" style=\"width:600px; height:450px; overflow:hidden;padding:0px;border:none;\"><script data-jetpack-boost=\"ignore\" type=\"text\/javascript\">\/* <![CDATA[ *\/(function($) { OpenLayers.ImgPath = \"https:\/\/wsbj.com\/sorabji\/wp-content\/plugins\/osm\/themes\/ol\/\"; map_1 = new OpenLayers.Map (\"map_1\", {            controls:[              new OpenLayers.Control.Navigation(),              new OpenLayers.Control.PanZoom(),              new OpenLayers.Control.Attribution()              ],          maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),          maxResolution: 156543.0399,          numZoomLevels: 19,          units: \"m\",          projection: new OpenLayers.Projection(\"EPSG:900913\"),          displayProjection: new OpenLayers.Projection(\"EPSG:4326\")      } );var layerMapnik = new OpenLayers.Layer.OSM.Mapnik(\"Mapnik\");var layerCycle  = new OpenLayers.Layer.OSM.CycleMap(\"CycleMap\");map_1.addLayers([layerMapnik, layerCycle]);map_1.addControl(new OpenLayers.Control.LayerSwitcher());var lonLat = new OpenLayers.LonLat(-166.473,60.077).transform(map_1.displayProjection, map_1.projection);map_1.setCenter (lonLat,8);var lonLat = new OpenLayers.LonLat(-166.473,60.077).transform(map_1.displayProjection, map_1.projection);map_1.setCenter (lonLat,8);})(jQuery)\/* ]]> *\/ <\/script><\/div><\/span>\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This turned into a shit show. I mean, this is what Szapp.Com is about: documenting the amount of time wasted on stuff that just does not work as specified. The Maps Marker Pro plugin for WordPress (which I expect to purchase\u00a0after getting to know it better during the free 30-day trial) is the most beautiful [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":19458,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_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":[32],"tags":[],"class_list":["post-3899","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-unrepentant","et-has-post-format-content","et_post_format-et-post-format-standard"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/wsbj.com\/sorabji\/wp-content\/uploads\/2014\/05\/kmlcsv_javaw-1.jpg?fit=497%2C273&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paumAn-10T","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/wsbj.com\/sorabji\/wp-json\/wp\/v2\/posts\/3899","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wsbj.com\/sorabji\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wsbj.com\/sorabji\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wsbj.com\/sorabji\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wsbj.com\/sorabji\/wp-json\/wp\/v2\/comments?post=3899"}],"version-history":[{"count":0,"href":"https:\/\/wsbj.com\/sorabji\/wp-json\/wp\/v2\/posts\/3899\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wsbj.com\/sorabji\/wp-json\/wp\/v2\/media\/19458"}],"wp:attachment":[{"href":"https:\/\/wsbj.com\/sorabji\/wp-json\/wp\/v2\/media?parent=3899"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wsbj.com\/sorabji\/wp-json\/wp\/v2\/categories?post=3899"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wsbj.com\/sorabji\/wp-json\/wp\/v2\/tags?post=3899"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}