You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Fabrizio Giudici <fa...@tidalwave.it> on 2009/02/04 02:16:41 UTC
GMap2: development mode + putting maps in a Panel = Google Maps broken
Hi.
I've seen a strange error in GMap2 - as I've a very limited knowledge in
HTML / Ajax, it might be a Google Maps API issue, I don't know.
What happened is that I put the GMap2 component in another Panel - and
Google Maps didn't work. I only saw a blank area and the Google logo put
at the top of the map area. After a long work of exclusion, I've
isolated two HTML fragment, one working and one not:
WORKING
<body id="page-home">
<div id="page">
<div id="content" class="clearfix">
<div id="main">
<div wicket:id="main">
<wicket:panel>
<h1 wicket:id="heading">Balestrino 17 [SV]</h1>
<p>
As Simple as it may get.
</p>
<div style="width: 640px; height:480px;
background: #ff0000;" wicket:id="map">
<div id="mmmap2a"
style="margin-left: auto; margin-right: auto; width: 600px; height:
400px;" wicket:id="mmmap">
<div id="infoWindow2b"
style="display:none" wicket:id="infoWindow">
</div>
<div id="map29"
style="width: 100%; height: 100%; position: relative;" class="gmap"
wicket:id="map"></div>
</div>
</div>
</wicket:panel>
</div>
<hr>
</div>
</div>
</div>
</body>
NOT WORKING
<body id="page-home">
<div id="page">
<div id="content" class="clearfix">
<div id="main">
<div wicket:id="main">
<wicket:panel>
<h1 wicket:id="heading">Balestrino 17 [SV]</h1>
<p>
As Simple as it may get.
</p>
<div style="width: 640px; height:480px;
background: #ff0000;" wicket:id="map">
<div id="mmmap2a"
style="margin-left: auto; margin-right: auto; width: 600px; height:
400px;" wicket:id="mmmap">
<wicket:panel>
<div id="infoWindow2b"
style="display:none" wicket:id="infoWindow">
</div>
<div id="map29"
style="width: 100%; height: 100%; position: relative;" class="gmap"
wicket:id="map"></div>
</wicket:panel>
</div>
</div>
</wicket:panel>
</div>
<hr>
</div>
</div>
</div>
</body>
The only difference is that wicket:panel element around the div
"infoWindow2b". Its presence screw up things. Configuring Wicket in
deployment mode, the HTML is cleaned up and the wicket:panel element is
removed, thus fixing things.
"mmmap2a" is the div that matches the GMap2 component (I've partially
tweaked the style for debugging); the component with wicket:id="map" is
a Panel I'm using.
--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
Fabrizio.Giudici@tidalwave.it - mobile: +39 348.150.6941
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: GMap2: development mode + putting maps in a Panel = Google Maps
broken
Posted by Nino Martinez <ni...@gmail.com>.
Theres no secret to this, you even get a warning message in your log /
console. It's the same case for some reason with openlayers..
regards Nino
Fabrizio Giudici wrote:
> Hi.
>
> I've seen a strange error in GMap2 - as I've a very limited knowledge
> in HTML / Ajax, it might be a Google Maps API issue, I don't know.
>
> What happened is that I put the GMap2 component in another Panel - and
> Google Maps didn't work. I only saw a blank area and the Google logo
> put at the top of the map area. After a long work of exclusion, I've
> isolated two HTML fragment, one working and one not:
>
>
> WORKING
>
> <body id="page-home">
> <div id="page">
> <div id="content" class="clearfix">
> <div id="main">
> <div wicket:id="main">
> <wicket:panel>
> <h1 wicket:id="heading">Balestrino 17
> [SV]</h1>
> <p>
> As Simple as it may get.
> </p>
>
> <div style="width: 640px; height:480px;
> background: #ff0000;" wicket:id="map">
> <div id="mmmap2a"
> style="margin-left: auto; margin-right: auto; width: 600px; height:
> 400px;" wicket:id="mmmap">
> <div id="infoWindow2b"
> style="display:none" wicket:id="infoWindow">
>
>
> </div>
> <div id="map29"
> style="width: 100%; height: 100%; position: relative;" class="gmap"
> wicket:id="map"></div>
> </div>
> </div>
> </wicket:panel>
> </div>
> <hr>
> </div>
> </div>
> </div>
> </body>
>
> NOT WORKING
>
> <body id="page-home">
> <div id="page">
> <div id="content" class="clearfix">
> <div id="main">
> <div wicket:id="main">
> <wicket:panel>
> <h1 wicket:id="heading">Balestrino 17
> [SV]</h1>
> <p>
> As Simple as it may get.
> </p>
>
> <div style="width: 640px; height:480px;
> background: #ff0000;" wicket:id="map">
> <div id="mmmap2a"
> style="margin-left: auto; margin-right: auto; width: 600px; height:
> 400px;" wicket:id="mmmap">
> <wicket:panel>
> <div id="infoWindow2b"
> style="display:none" wicket:id="infoWindow">
>
>
> </div>
> <div id="map29"
> style="width: 100%; height: 100%; position: relative;" class="gmap"
> wicket:id="map"></div>
> </wicket:panel>
> </div>
> </div>
> </wicket:panel>
> </div>
> <hr>
> </div>
> </div>
> </div>
> </body>
>
>
> The only difference is that wicket:panel element around the div
> "infoWindow2b". Its presence screw up things. Configuring Wicket in
> deployment mode, the HTML is cleaned up and the wicket:panel element
> is removed, thus fixing things.
> "mmmap2a" is the div that matches the GMap2 component (I've partially
> tweaked the style for debugging); the component with wicket:id="map"
> is a Panel I'm using.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: GMap2: development mode + putting maps in a Panel = Google Maps
broken
Posted by Ryan Gravener <ry...@ryangravener.com>.
Are your wicket tags being stripped? Is ajax debug mode disabled?
Ryan Gravener
http://ryangravener.com/flex | http://twitter.com/ryangravener
On Tue, Feb 3, 2009 at 8:16 PM, Fabrizio Giudici <
fabrizio.giudici@tidalwave.it> wrote:
> Hi.
>
> I've seen a strange error in GMap2 - as I've a very limited knowledge in
> HTML / Ajax, it might be a Google Maps API issue, I don't know.
>
> What happened is that I put the GMap2 component in another Panel - and
> Google Maps didn't work. I only saw a blank area and the Google logo put at
> the top of the map area. After a long work of exclusion, I've isolated two
> HTML fragment, one working and one not:
>
>
> WORKING
>
> <body id="page-home">
> <div id="page">
> <div id="content" class="clearfix">
> <div id="main">
> <div wicket:id="main">
> <wicket:panel>
> <h1 wicket:id="heading">Balestrino 17 [SV]</h1>
> <p>
> As Simple as it may get.
> </p>
>
> <div style="width: 640px; height:480px;
> background: #ff0000;" wicket:id="map">
> <div id="mmmap2a" style="margin-left:
> auto; margin-right: auto; width: 600px; height: 400px;" wicket:id="mmmap">
> <div id="infoWindow2b"
> style="display:none" wicket:id="infoWindow">
>
>
> </div>
> <div id="map29" style="width:
> 100%; height: 100%; position: relative;" class="gmap" wicket:id="map"></div>
> </div>
> </div>
> </wicket:panel>
> </div>
> <hr>
> </div>
> </div>
> </div>
> </body>
>
> NOT WORKING
>
> <body id="page-home">
> <div id="page">
> <div id="content" class="clearfix">
> <div id="main">
> <div wicket:id="main">
> <wicket:panel>
> <h1 wicket:id="heading">Balestrino 17 [SV]</h1>
> <p>
> As Simple as it may get.
> </p>
>
> <div style="width: 640px; height:480px;
> background: #ff0000;" wicket:id="map">
> <div id="mmmap2a" style="margin-left:
> auto; margin-right: auto; width: 600px; height: 400px;" wicket:id="mmmap">
> <wicket:panel>
> <div id="infoWindow2b"
> style="display:none" wicket:id="infoWindow">
>
>
> </div>
> <div id="map29" style="width:
> 100%; height: 100%; position: relative;" class="gmap" wicket:id="map"></div>
> </wicket:panel>
> </div>
> </div>
> </wicket:panel>
> </div>
> <hr>
> </div>
> </div>
> </div>
> </body>
>
>
> The only difference is that wicket:panel element around the div
> "infoWindow2b". Its presence screw up things. Configuring Wicket in
> deployment mode, the HTML is cleaned up and the wicket:panel element is
> removed, thus fixing things.
> "mmmap2a" is the div that matches the GMap2 component (I've partially
> tweaked the style for debugging); the component with wicket:id="map" is a
> Panel I'm using.
>
>
> --
> Fabrizio Giudici - Java Architect, Project Manager
> Tidalwave s.a.s. - "We make Java work. Everywhere."
> weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
> Fabrizio.Giudici@tidalwave.it - mobile: +39 348.150.6941
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>