Page 1 of 1

024 - Create a module to embed a personalized Google Map

Posted: Sat Dec 29, 2007 9:45 pm
by Benjamin Hättasch
So, a new task for me:
Create a module that allows an end user to embed a personalized Google Maps.
Description

Create instructions how end users can use Google Maps to create and
annotate their own map. Create a module that the end user can use to embed
this map into their Joomla! v 1.5 website.
Skills Needed

    * Ability to install XAMPP, download and install Joomla! on a localhost
using default data.
    * Familiarity with Joomla!
    * Knowledge of PHP
    * Knowledge of MySQL

Difficulty

Advanced.
Work Product

A functioning Joomla! v 1.5 module packaged for installation.
Licensing

All code must be created using the GNU General Public License version 2.
http://www.gnu.org/licenses/old-license ... .html#SEC4

Documentation written for this task must be made available under the
Joomla! Electronic Documentation License.
Extra Credit (Optional)

Register as a developer at joomlacode.org and create a project for your module.
Time Limit

4 weeks.

Task-Description at Google Code


When I have problems, I will aks you here. I hope I will have succes, in contrast to the others before me. ;)

Re: 024-Create a module to embed a personalized Google Map

Posted: Sat Dec 29, 2007 9:57 pm
by AmyStephen
You'll have nothing but the finest success!  8)

Yes, certainly do ask with questions. This is a great task - something many applications require. Thanks for taking it!

Amy :)

Re: 024-Create a module to embed a personalized Google Map

Posted: Sat Dec 29, 2007 11:46 pm
by shantanubala
This would've been something nice to add to the task page, just as a reference, if the module is to use Google's AJAX API's

http://code.google.com/apis/maps/index.html

-Shantanu

Re: 024-Create a module to embed a personalized Google Map

Posted: Sun Dec 30, 2007 2:31 pm
by Benjamin Hättasch
I started with coding some hours ago, and I also created a page at joomlacode.org. Whenever I finish a new version, I will upload it there and post a link here. The URL of the project's home is http://joomlacode.org/gf/project/mod_googlemap/

Re: 024-Create a module to embed a personalized Google Map

Posted: Sun Dec 30, 2007 5:37 pm
by Benjamin Hättasch
First version of the Modul is avalible at http://joomlacode.org/gf/project/mod_go ... dit&id=607.

---
I need a title for this. Has anyone a good idea?

Re: 024-Create a module to embed a personalized Google Map

Posted: Sun Dec 30, 2007 10:57 pm
by shantanubala
How about "ModuleMap"?

-Shantanu

Re: 024-Create a module to embed a personalized Google Map

Posted: Tue Jan 01, 2008 6:12 am
by AmyStephen
Very nice for a first draft! :)

To load the javascript so that you don't have to click the Load Map link,  you can change this:
  if ($key"") {
echo "Load Map";

echo "";
    echo "";
    echo "function initialize() {";
    echo " if (GBrowserIsCompatible()) {";
    echo "  var map = new GMap2(document.getElementById(\"map_canvas\"));";
    echo "    map.setCenter(new GLatLng($myLatitude, $myLongitude), $zoom);}}";
    echo "";
     
To actually load the Javascript (last example)
// Add Javascript
$document =& JFactory::getDocument();
$document->addScript( JURI::base() . 'plugins/content/example.js' );

// Load CSS
$document->addStyleSheet( JURI::base() . 'plugins/content/example.css', 'text/css', null, array( ' id' => 'StyleSheet' ) );

// Dynamic load of JS

$js = "new example().callExample({ \n";
$js .= "    etc', \n";
$js .= "}); ";

$document->addScriptDeclaration($js);
Very nice work - you are doing great! Thanks for the instructions, too.
Amy :)

Re: 024 - Create a module to embed a personalized Google Map

Posted: Sun Jan 06, 2008 5:13 am
by AmyStephen
Benjamin -

Need some help getting these changes made? I'd be more than happy to provide more, if you have questions. This is almost ready!

Thanks,
Amy :)

Re: 024 - Create a module to embed a personalized Google Map

Posted: Sun Jan 20, 2008 2:39 am
by AmyStephen
Benjamin -

You can submit that as complete, as is. There certainly could be situations where people want a link to be clicked for a map.

Let me know if you are ready to have it finalized or if you want to continue to work on it in order for the map to dynamically load.

Thanks!
Amy :)

Re: 024 - Create a module to embed a personalized Google Map

Posted: Sun Jan 20, 2008 2:11 pm
by Benjamin Hättasch
I will add some features during the next hours and will then upload the file for final testing.

Re: 024 - Create a module to embed a personalized Google Map

Posted: Sun Jan 20, 2008 3:12 pm
by AmyStephen
Yea! Glad to see you back! Thanks Benjamin!

Amy :)

Re: 024 - Create a module to embed a personalized Google Map

Posted: Sun Jan 20, 2008 9:05 pm
by Benjamin Hättasch
Version 0.3 is finished

Download: http://joomlacode.org/gf/project/mod_go ... ew&id=1038.

Please test this. Now the self-initialisation is realised, using Google AJAX API. A Link can be activated by a parameter for reseting the map to the original position.

A french Joomla! community member has offered me to add a french translation, wich will be included in Version 0.4. I will integrate some new features in the next version, too. This is not the final version, but now all core functions are realised.

Please post here the features you want to have added in the next version. Thanks and much fun with the module,
Benjamin

---
List of possible features in the next version:
-Geocode-Caching
-Control elements for the maps
-And? You choose...

Re: 024 - Create a module to embed a personalized Google Map

Posted: Sun Jan 20, 2008 9:42 pm
by AmyStephen
PERFECT!  8)

Where did you get the code?

That is very, very nice! I can even move the map around - double click to zoom in all the way down to my house. I even waved at myself. ;)

Do you have a link to something you used to figure this out? I'd love to read more.

Thanks so very much for this. Add the link to your JoomlaCode extension (since we can't upload due to space limitations) and I"ll mark this as complete. Really great job, Benjamin. I'll be watching to see how things go with the extension and the community. Don't hesitate to contact us if we can help, in the future, too and thank you SO MUCH for your contributions to the Joomla! community!

Task complete.
Amy :)

Re: 024 - Create a module to embed a personalized Google Map

Posted: Mon Jan 21, 2008 8:43 pm
by Benjamin Hättasch
AmyStephen wrote: PERFECT!  8)

Where did you get the code?

That is very, very nice! I can even move the map around - double click to zoom in all the way down to my house. I even waved at myself. ;)

Do you have a link to something you used to figure this out? I'd love to read more.

  To learn more about the Google AJAX API for GoogleMaps read: http://code.google.com/apis/maps/docume ... JAX_Loader

Thanks so very much for this. Add the link to your JoomlaCode extension (since we can't upload due to space limitations) and I"ll mark this as complete. Really great job, Benjamin. I'll be watching to see how things go with the extension and the community. Don't hesitate to contact us if we can help, in the future, too and thank you SO MUCH for your contributions to the Joomla! community!

Task complete.
Amy :)
I thank you a lot for the plaudit. I will do some little changes and then offer you the final file.

/edit: I finished a new version some moments ago and will upload it after testing it.

Re: 024 - Create a module to embed a personalized Google Map

Posted: Wed Jan 23, 2008 1:35 pm
by AmyStephen
Benjamin -

As soon as possible, please upload your work to Google so that I can close this task.

Thanks so very much!

Amy :)

Re: 024 - Create a module to embed a personalized Google Map

Posted: Sun Feb 03, 2008 6:01 pm
by Benjamin Hättasch
I'm sorry, but I can't finish the work, because I only get the error "Issue attachment storage quota
exceeded", if I click into the comment field in the Issue tab.

Re: 024 - Create a module to embed a personalized Google Map

Posted: Mon Feb 04, 2008 8:32 am
by AmyStephen
Benjamin -

Just wanted to make certain you understand this is okay. Lots of people are having this problem (again) and we know you completed the task and we have the link to your work.

Thanks again for all of your wonderful work!
Amy :)

Re: 024 - Create a module to embed a personalized Google Map

Posted: Mon Feb 04, 2008 8:59 am
by MiCCAS
AmyStephen wrote: Benjamin -

Just wanted to make certain you understand this is okay. Lots of people are having this problem (again) and we know you completed the task and we have the link to your work.

Thanks again for all of your wonderful work!
Amy :)
blimey good job!

Re: 024 - Create a module to embed a personalized Google Map

Posted: Wed Feb 13, 2008 8:40 pm
by MasterC
Wanted to mention this module works perfectly! Great job, very much appreciated.

Re: 024 - Create a module to embed a personalized Google Map

Posted: Wed Feb 20, 2008 6:36 pm
by Binary
Just tested this on my WAMP home server -- just wanted to say this module works very, very well.

Very well done, Benjamin!
(And AmyStephen for helping Benjamin out on the loading JS bit. :laugh: )

Re: 024 - Create a module to embed a personalized Google Map

Posted: Wed Feb 20, 2008 11:57 pm
by Benjamin Hättasch
Binary wrote:Just tested this on my WAMP home server -- just wanted to say this module works very, very well.

Very well done, Benjamin!
(And AmyStephen for helping Benjamin out on the loading JS bit. :laugh: )
Over 1,000 downloads. I'm very happy that the module is useful and works good.
So I can't stop to say thank you to Amy for her mentoring, but I have to add, that the load of the map isn't realised by the way Amy offered me. It uses Google AJAX API Loader, the resulting PHP-Code could also be used outside of Joomla, if you would replace the param->get function.


By the way: Let me announce the next version of the module, using GeoCode Caching to replace the Coordinates-Parameters-Function. And: A Plugin delivered with the module to easily reset the coordinates of the map by pressing a button or link in an article. Also: XML-file based import and export of the settings, an Admin-Frontside-Menu, Markers and much more. Stay tuned.

Re: 024 - Create a module to embed a personalized Google Map

Posted: Thu Feb 21, 2008 12:07 am
by MasterC
Sounds awesome! Looking forward to future additions!

-Chad

Re: 024 - Create a module to embed a personalized Google Map

Posted: Thu Feb 21, 2008 12:28 am
by Binary
Benjamin Hättasch wrote:
Binary wrote:Just tested this on my WAMP home server -- just wanted to say this module works very, very well.

Very well done, Benjamin!
(And AmyStephen for helping Benjamin out on the loading JS bit. :laugh: )
Over 1,000 downloads. I'm very happy that the module is useful and works good.
So I can't stop to say thank you to Amy for her mentoring, but I have to add, that the load of the map isn't realised by the way Amy offered me. It uses Google AJAX API Loader, the resulting PHP-Code could also be used outside of Joomla, if you would replace the param->get function.
Haha, what I initially meant was; thanks to Amy for trying to help out as well on this wonderful module. :D
Anyway, very nice module! *thumbs up*

Re: 024 - Create a module to embed a personalized Google Map

Posted: Fri Mar 14, 2008 3:07 pm
by hdelange
Hello Benjamin,

you have made a nice module.

but is it possible that someone can give me an example of using the Special function you mentioned.

javascript:ShowMap(myLatitude, myLongitude, Zoom)

thanks,

Henk

Re: 024 - Create a module to embed a personalized Google Map

Posted: Mon Mar 24, 2008 1:40 pm
by Benjamin Hättasch
hdelange wrote:Hello Benjamin,

you have made a nice module.

but is it possible that someone can give me an example of using the Special function you mentioned.

javascript:ShowMap(myLatitude, myLongitude, Zoom)

thanks,

Henk
I will try to explain it:

If you write an article, containing a place that you will show, for example the place of a store, if you talk about your product. Normaly the module shows another place, but you want to show the visitors the new place, but only if the click on the name of the store. Then you will be able to do the following: In the text you mark a point and create a link, but not to a website but the one you mentioned. You write:

Code: Select all

ShowMap(<X-Coordinate>, <Y-Coordinate>, <Zoom-Level>)
When the user clicks the link, the map will change to the new place.

Now you've go also the possibility to install the 'Plugin for ModuleMap' instead. With this you can easily write:

Code: Select all

{Show Map x=<X-Coordinate>&y=<Y-Coordinate>&zoom=<Zoom-Level>}<The link-text>{/ShowMap}
The plugin will parse this into a clickable link. At this moment this might look longer than to write the link itself, but in later versions of the plugin there will be a lot more possibilities when using this method. Read the updated documentation for more informations.

Re: 024 - Create a module to embed a personalized Google Map

Posted: Wed Aug 06, 2008 5:46 am
by capetownman
hello you all all that sounds very awesome!

this is a most wanted module - many many are looking forward to future additions!


a quick note: is there any test-site up and running with the module - perhaps i have overseen the link... ;-) ;D




update: hi there - i am a novice and a freshmen
i love what i see - it sounds very very promising.
i wonder what the difference is between the google maps APi and ModuleMap - http://joomlacode.org/gf/project/mod_googlemap
i have no clue - plz set me straight. lemme know!

kindest regards floo - mailto floobee@web.de