You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Nomen Nomanum <ge...@outlook.com> on 2013/05/31 02:47:15 UTC
Boosting TapJQuery GMap3
Hi! I have implemented TapJQuery GMap3, and it works just fine. However, I would like to be more or less like the example on Gmap3 page, http://gmap3.net/en/pages/19-demo/ .
How to achieve this, any tips, anything? Thanks in advance.
RE: Boosting TapJQuery GMap3
Posted by Lance Java <la...@googlemail.com>.
It looks to me that you are passing a string for
"google.maps.MapTypeId.TERRAIN" instead of the javascript constant.
Try new JSONLiteral("google.maps.MapTypeId.TERRAIN")
RE: Boosting TapJQuery GMap3
Posted by Nomen Nomanum <ge...@outlook.com>.
Great! :) I follow your steps, and it seems to me I am somehow lost. I have written this small piece of code, just to see whether or not my Gmap3 takes parameters, and it doesn't, which is a sign that I am not doing it right.
public JSONObject getParams() {
JSONObject json = new JSONObject();
json.put("height", 600); // test height
json.put("width",600); // test width
json.put("mapTypeId","google.maps.MapTypeId.TERRAIN"); // test map type
json.put();
return json;
}
and in my tml file I have
<div t:type="jquery/map" t:id="map" t:parameters="params">
</div>
> Date: Fri, 31 May 2013 09:06:04 +0200
> Subject: Re: Boosting TapJQuery GMap3
> From: demey.emmanuel@gmail.com
> To: users@tapestry.apache.org
>
> Hi,
>
> You just need to set the parameters params of this components. It is JSON
> Object. It corresponds to the one provided by the jQuery widget.
>
> For callback, ,i will recommend to use JavaScript closures. You can find
> example in one other projet tapestry-jquery-jqgrid :
> https://github.com/got5/tapestry5-jquery-jqgrid/blob/master/src/test/java/org/got5/tapestry5/jquery/jqgrid/test/pages/BASIC_ColumnChooser.java
> https://github.com/got5/tapestry5-jquery-jqgrid/blob/master/src/test/jquery/jqgrid/webapp/static/js/demo.js
>
> Manu
>
>
> 2013/5/31 Nomen Nomanum <ge...@outlook.com>
>
> > Hi! I have implemented TapJQuery GMap3, and it works just fine. However, I
> > would like to be more or less like the example on Gmap3 page,
> > http://gmap3.net/en/pages/19-demo/ .
> >
> >
> > How to achieve this, any tips, anything? Thanks in advance.
> >
>
>
>
>
> --
> Emmanuel DEMEY
> Ingénieur Etude et Développement
> ATOS Worldline
> +33 (0)6 47 47 42 02
> demey.emmanuel@gmail.com
> http://emmanueldemey.fr/
>
> Twitter : @EmmanuelDemey
Re: Boosting TapJQuery GMap3
Posted by Emmanuel DEMEY <de...@gmail.com>.
Hi,
You just need to set the parameters params of this components. It is JSON
Object. It corresponds to the one provided by the jQuery widget.
For callback, ,i will recommend to use JavaScript closures. You can find
example in one other projet tapestry-jquery-jqgrid :
https://github.com/got5/tapestry5-jquery-jqgrid/blob/master/src/test/java/org/got5/tapestry5/jquery/jqgrid/test/pages/BASIC_ColumnChooser.java
https://github.com/got5/tapestry5-jquery-jqgrid/blob/master/src/test/jquery/jqgrid/webapp/static/js/demo.js
Manu
2013/5/31 Nomen Nomanum <ge...@outlook.com>
> Hi! I have implemented TapJQuery GMap3, and it works just fine. However, I
> would like to be more or less like the example on Gmap3 page,
> http://gmap3.net/en/pages/19-demo/ .
>
>
> How to achieve this, any tips, anything? Thanks in advance.
>
--
Emmanuel DEMEY
Ingénieur Etude et Développement
ATOS Worldline
+33 (0)6 47 47 42 02
demey.emmanuel@gmail.com
http://emmanueldemey.fr/
Twitter : @EmmanuelDemey