{"id":339,"date":"2006-11-29T21:36:55","date_gmt":"2006-11-29T20:36:55","guid":{"rendered":"http:\/\/wp.devco.net\/?p=339"},"modified":"2009-10-09T14:16:45","modified_gmt":"2009-10-09T13:16:45","slug":"gmaps_php_version_16","status":"publish","type":"post","link":"https:\/\/www.devco.net\/archives\/2006\/11\/29\/gmaps_php_version_16.php","title":{"rendered":"GMaps PHP version 1.6"},"content":{"rendered":"
GMapEZ<\/a> has supported drawing lines using the Google Maps API for a while now, but I’ve always put off implimenting this since I thought it would be quite a bit of work and involve lots of changes in my XML format. I finally decided to impliment it today and I found a very easy way to assign points to lines. The points on the line get connected in order that they appear in your data file. This will draw the line in the image above, I think it’s very simple and it should be 100% backward compatible with your exiting data should you choose not to use this feature. GMapEZ has supported drawing lines using the Google Maps API for a while now, but I’ve always put off implimenting this since I thought it would be quite a bit of work and involve lots of changes in my XML format. I finally decided to impliment it today and I found a very easy way […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","footnotes":""},"categories":[7],"tags":[121,57,42],"_links":{"self":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/339"}],"collection":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/comments?post=339"}],"version-history":[{"count":1,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/339\/revisions"}],"predecessor-version":[{"id":571,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/339\/revisions\/571"}],"wp:attachment":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/media?parent=339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/categories?post=339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/tags?post=339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
\nFirst an example map so you can see what you can achieve:
\n
\nThe line thickness, color and opacity is configurable on a per-line basis and you can assign any point in your existing data file to a line on the map, to achieve this I extended the XML data using a <linemember><\/i> element, here is an example point:<\/p>\n\n
\n<point>\n<lat>51.393522<\/lat>\n<long>0.527054<\/long>\n<type>visit<\/type>\n<title>Chatham Historic Dockyard<\/title>\n<country>England<\/country>\n<href>http:\/\/www.chdt.org.uk\/<\/href>\n<linktext>Home Page<\/linktext>\n<linemember>1<\/linemember><\/b>\n<\/point>\n<\/pre>\n<\/blockquote>\n
\nTo configure the line created above you can add a [line1<\/b>]<\/i> section to your configuration file, simply match up the linemember numbers with the lineX section in your config, a sample:<\/p>\n\n
\n[line1]\ncolor = #00ff00\nwidth = 2\nopacity = 0.6\n<\/pre>\n<\/blockquote>\n
\nAs always you can get the code at http:\/\/www.devco.net\/code\/gmapsphp-current.tgz<\/a> the documentation at http:\/\/www.devco.net\/pubwiki\/GMapsPHP<\/a> has also been updated to reflect these changes.<\/p>\n","protected":false},"excerpt":{"rendered":"