Nice component! The simplest thing I would suggest enabling is just
using the dojo version (and be careful to always wrap the bugger with
an element with a set width/height. Then its just a matter of doing
what theyre doing here
http://archive.dojotoolkit.org/nightly/tests/widget/test_GoogleMap.html.
That way,the points on the map and the html contnet to be shown in the
balloon are just cells in an html table which,thankfully, dojo parses
for you.

The version of dojo packaged with tapestry 4.1 doesnt have the more
update version of the widget so you'd have to override it to take
advantage of it (im not sure how easy that'd be as i havent examined
the updates to the package system in dojo of late..). The new one is
worth having -- it has support for geocoding via the gmaps api, and
much more.

I will-if-so-desired/could donate the ten r twenty lines youd need to
wrap the dojo version usefully -- but im only using the functionality
available in the tapestry-bundled dojo, which is inferior with respect
to this one widget...

Nice work (as usual!), though! I can't wait to see more.

As to the script tag issue itself, with the dojo component you specify

djConfig.googleMapKey:"..."

and it adds the script tag for you. If you choose. You can also just
add the script tag yourself manually some place (maybe to fix the
version of the gmaps API or something) and it respects that...

Thanks,
Josh



On 8/28/06, andyhot <[EMAIL PROTECTED]> wrote:
i would add the normal html <script> tag directly in the page...

You might also like to take a look at tacos:Gmap component:
http://opencomponentry.com:8080/tacos/tests/Maps.html

All its code is at
https://svn.sourceforge.net/svnroot/tacos/tacos-4.0/trunk/src/java/net/sf/tacos/components/maps/

It can take the google key as a parameter but it can also look it up at
the tacos.components.MapLicenses
configuration point and choose the most appropriate key... For instance
https://svn.sourceforge.net/svnroot/tacos/tacos-4.0/trunk/demo/docroot/WEB-INF/hivemodule.xml
configures 3 licenses and the correct one will be used.

As is, the component accepts width, height, zoom, type ( street,
satellite, hybrid ), coordX, coordY.

I could really use a bit of help on how to extend its functionality

Bastian Voigt wrote:
> Hi *,
>
> for using Google Maps on my site, I need to load javascript from an
> external asset.
> Depending on the hostname with which my application is accessed, a
> specific Google Maps Key must be used.
> According to the documentation, there is a scriptAsset parameter which
> can be used for that:
> http://tapestry.apache.org/tapestry4/tapestry/ComponentReference/Script.html
>
>
>
> I have tried the following approach. The html template:
>
> <span jwcid="@Script" scriptAsset="ognl:mapsScriptAsset" />
>
>
> And the java code:
>
> public IAsset getMapsScriptAsset()
> {  String url =
> "http://maps.google.com/maps?file=api&v=2&key="+getMapsKey();
>  ExternalAsset ae = new ExternalAsset(url, getLocation());
>  return ae;
> }
>
>
> It gives the following error:
> "Required parameter script of component Googlemaps/$Script is not bound."
>
> When using parameter "script" instead of "scriptAsset":
> <span jwcid="@Script" script="ognl:mapsScriptAsset" />
>
> It gives the following error:
>
> "Unable to parse script
> 
context:/WEB-INF/ExternalAsset[http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAXvmBBujxIhwL0oqqKXN5RRRHrpkeUMcZ-AhY_tkw0mxFBafLzxTQ1A84GMM1SSRXvtEYxXc6Vws2DA].";
>
>
>
>
> What am I doing wrong here?
> I would appreciate any help :)
>
> Kind regards
> Bastian
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to