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-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org