Google Maps plugin?
|
31 posts
|
A plugin i myself would find rather usefull is a Google Maps plugin which would allow you to place a map and pointer(s) on a page. Via the admin it is possible to set api key, additional parameters (size, zoomlevel, lat.long etc.) Can be nice for displaying for example company location(s) etcetera. I’m sure others can come up with interesting use cases. Anyways, just a thought. |
|
257 posts
|
Nice idea Tunnis, if I get time, I will try to help you with it. I have a mashup at My Site which does a similar thing but hard coded rather than dynamic like you’re suggesting. Will let you know how it comes on… |
|
486 posts
|
Google maps are one of those things where just because you can do it doesn’t mean you should. About 90% of the time I encounter a Google map on a site, there’s no good reason for it to be there, and it slows the page load. I find it very annoying actually. So by all means build the plugin, but please use it with caution! |
|
486 posts
|
BTW, Tunnis, did you know that you can embed a Google map without using the API? http://google-latlong.blogspot.com/2007/08/youtube-style-embeddable-maps_21.html |
|
184 posts
|
In case anyone is interested I have just created GoogleMap The plugin is for 0.9.5 Frog and can be used onced installed, by calling displayGoogleMap() in your page. The current build isn’t ideal (currently it places all javascript within the body – not ideal) but until Frog plugin architecture supports otherwise I think this makes the plugin more friendly for non-dev types. Let me know what you think. |
|
184 posts
|
0.2.1 is now available. I’ve made quite a few changes, particularly the way it loads in the page. The documentation is still lacking however, otherwise, please let me know if you find it useful. |
|
2 posts
|
Can you tell us a bit about the features? or does it just display’s a googlemap? |
|
184 posts
|
Firstly, this plugin uses dom replacment to place the map into the page. Currently, there are no plans for iframe embedding.
|
|
1493 posts
|
I was looking forward to giving this a go … but when I enabled it, it broke my Admin/Settings page. :( It simply stopped processing at the point it got to GoogleMaps. Removing it from my plugins directory cleared it up. Any ideas?? Update: That was on r384. I just tried it with r403, and it seems fine. :) |
|
1493 posts
|
P.s. If I leave the “Marker” values blank (for Google default), I get a blank. Otherwise, ticking along nicely! :) |
|
184 posts
|
Hi David, Thanks for giving it a go. Regarding your feedback:
I don’t recall which revision I originally wrote it for, but I currently have it working with r417. Did you perhaps download and enable the earlier plugin? I have changed database naming conventions in GoolgeMap 0.2.1 There was also a syntax issue early on which did affect the Frog Admin/Plugins page as you described, but this should hopefully be permanently resolved now. Could you please confirm!?
Could you please ellaborate on that Daivd? Do you mean the map returns blank? Is it possible that for some reason, not all the required code/values are being generated? Just in case, could you confirm what code is generated when the page is returned to the browser!? |
|
1493 posts
|
If I have the “wearehere.png”, and no values for the marker’s width or height, then the #googlemap DIV is completely empty:
Just like that! In fact — I cannot get the “wearehere.png” marker to appear at all. I tried several different paths and locations, too. Puzzling! If I leave the “Marker Icon” empty, then all is well; it doesn’t matter whether values for height and width are present or absent. I’ve added this to the Contributed Plugins list, btw! Thanks for your work on this? Anything on the “to-do”/enhancement list? I’m wondering how you use this to display more than one location per Frog site…? |
|
184 posts
|
Hi David, I will look into the custom marker setup some more … I was planning to keep this off the Contributed Plugins list until I had thoroughly tested it, but if you are okay for it to be on there as is then I am happy for it to be there. As for the enhancement/to-do list, I am looking to add various other options (and better documentation) but am not sure about multiple map support yet. I had thought about that prior to the first build in fact, but made the decision to get a single map version working as sweet as possible first. Maybe even a new plugin would be more appropriate for multi-map support … perhaps with an option to choose between Google Map and Multimap!? For now, fully-working custom marker support is on top of the list. But first, I am working on a plugin version of the site search script as I feel it would be worthwhile upgrading it into a plugin (plus, I like the challenge). |
|
4 posts
|
When I enabled the plugin, it broke my admin/settings page. Like David said. Debug view: Fatal error: Method View::__toString() must not throw an exception in /var/www/vhosts/mydomain/httpdocs/frog/app/layouts/backend.php on line 116 Frog 0.9.5 RC2 |
|
184 posts
|
Hi xkapr, I have made a note of your problem and will see if I can find what is causing it when I get time to work on this next. Just so you know, this plugin hasn’t been fully tested hence why it is still only a 0.x build. |
|
184 posts
|
GoogleMap 0.4.0 is now available. Current features/changes:
|
|
1 posts
|
Thanks BlueFrog for your plugin! sorry, but I’m not very much pro with Frog… |
|
184 posts
|
Hi dreafara, Sadly, not at present. It is on the list but I just haven’t had the time. |
|
1 posts
|
Hi for those having problems and errors like the one bellow, this is caused by the naming convention of the controller. It needs to be ‘GooglemapController.php’ instead of ‘GoogleMapController.php’ and also change the code inside the file from ‘class GoogleMapController extends PluginController’ to ‘class GooglemapController extends PluginController’. Seems to be a bug with Frog CMS version 0.9.5, latter versions appear to be fixed. “AutoLoader did not find file for ‘GooglemapController’!” Hope this fixes it for people! |