A Google Map filter module has now been released. It is available on the modules page.
This module consists of two parts. First an interactive page which allows you to build a Google Map by changing the size, moving the page around changing the magnification and changing the type of map and controls. You can also add up to 3 markers and up to three routes (made up of points connected by lines) on each map.
The second part is a filter that converts the macro into the javascript and html required to display the Google map in your node.
On my Vancouver.CycleHome.org website you can see the macro creation tool and a node with a map inserted.
Note that if you downloaded a version of this module that I had uploaded yesterday, I recommend you get the latest version as this fixes a number of little things and improves the interface for the macro creation page.
Also a minor update to my Tables Module was uploaded as well. This was a minor update to allow the tables to be formatted using the theme tables formatting.
The Tables Module is a simple filter that lets you insert a table using "|" to separate columns and then formatting as an HTML table. It includes a number of predefined styles for the tables to achieve fancy formatted tables.
You can view a demo of the tables filter at http://www.webgeer.com/tables_demo
Comments
An error
Are you aware that anonymous people can create stories and forum posts on http://Vancouver.CycleHome.org
A spammer could fill up your submission queue and annoy you :-/
When I tried to enter a ranom story the site crashed too, with the error:
The tables filter is impressive. I think somebody was asking about just such a filter for tinymce integration too!
On the GMap filter, who imposes the 3 pin limit?
In the macro creator...
When I change the control type to "large", the map looks like it needs refreshing as it draws the bigger controls over the smaller ones. If i click 'reload' button it then looses my 'large' setting, by reverting back to the 'small' choice. The same sort of thing happens with any changes to "map type" too.
Overall the GMap stuff is looking good. :-)
--
www.bargainspy.co.uk | www.mobilebeat.co.uk
--
Ixis (UK): Drupal support, Drupal hosting.
Thanks
It was intended that the website be as open as possible to encourage participation, in the long run this probably will change, but I'll deal with that when I have to.
I'll have to look into that error.
The 3 pin limit was an arbitrary thing. It was all I really wanted. It would be trivial to do more, but it would not be so simple to do more and allow removing the pins by clicking. Not impossible, but it would be more difficult. (would involve lots of array traversing in javascript).
As for the controls size thing, that is strange it worked before no problem. I'm not sure how that got lost. I'm pretty sure it works in Firefox.
Could this be integrated with GPS waypoints
Imagine someone having a GPS device with some recorded way points he/she wants to assign to the map.
Now it is difficult because one is not allowed to enter the points numerically, but only by clicking on the map.
Otherwise really great work!
Best regards,
Lennart
Best regards,
Lennart
That would be pretty easy to
That would be pretty easy to do. I didn't have that in mind when I wrote it, but it would be quite easy to implement.
It should be noted that you could do this manually by editing the macro (best to do it after you generate the map extents and type and insert into your node so it doesn't get re-written) and enter the points separated by a plus symbol. If you do it this way, you will not be limited to 3 points either. It would allow an unlimited number of point.
Thanks
I did not think of just editing the macro after the paste - thanks for pointing it out.
Best regards,
Lennart
Best regards,
Lennart
Postcode to long/lat co-ordinates conversion
Would be good to provide a way for users to provide a postcode (or zip code) and it gets auto converted to the required co-ordinates for use in gmap.
For the UK such a free database is available from
http://www.jibble.org/ukpostcodes/
There could be others/better ones out there.
--
www.bargainspy.co.uk | www.mobilebeat.co.uk
--
Ixis (UK): Drupal support, Drupal hosting.
Add to todo list
I think that is a good idea as long as it can be done relatively simply. To keep with the general way the macro creation works, I would prefer if I could do the Geocoding using Javascript (so that it is done on the client side and no page reloading is necessary). However, I'm not sure how easy that will be to do.
I'll add this to my todo list.
Will probably be done with a field that you enter either the address or the postal code and then a drop down to pick which geocoder to use (geocoder.us, geocoder.ca and if I can find a free one for other countries that returns similar xml I will use them as well) Probably with some logic to determine whether it looks like a PC or an address...
Map Points from a Flexinode postcode field.
It would be great if the map points could be generated from a flexinode "postcode" field.
An examle of this would be if you had a flexinode for art exhibitions in a city, one of the fields could be "postcode". You could then show the city map with all of the pins locating the various venues on the same map which would be generated from the "postcode" field.
Converting a "postcode" into
Converting a "postcode" into mapping (lat,lon) data is a non-trivial task. This requires using Geocoding. Geocoding information is available from third party sources for some countries.
I do intend on better integration with location.module (which includes geocoding for some countries) so that this kind of thing can be done.
what do you put into the point/line fields?
I've gotten the map to appear in a node, but when I entered a lattitude/longitude combination in the point field, nothing appeared. What is it looking for? I'd just like to add some pins.
Thanks,
Valerie
My mistake
It is actually longitude, latitude rather than the other way around
so to put a pin near where I work in Downtown Vancouver and in Stanley Park you would include:
points=-123.13489437103271,49.294036670815565 + -123.11498165130615,49.280124466477595
Hope that solves your problem.
thanks! one other question:
is there a way to have more than one map on the same page (in the same node)? Right now when I try it with two, the first appears and the second does not.
Thanks for your help (and for the great mod)
figured it out
I just needed to make sure the map ids were different. then, no problems.
Thanks!
Any chance...
Any chance this gmap centers to a zip code search has been accomplished? I'm looking to have users input a zipcode (which would have to be geocoded to lat/long, obviously) to center a gmap with node markers.