Google Map display problem
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > WebSphere > WebSphere Portal Server > Google Map display problem




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Google Map display problem  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-31-07 12:19 PM

Hi All,

I am trying to show Google Map on jsr 168 portlet using Google Map API for t
hat I developed sample html file which works perfectly and give me proper re
sult after that I copied code and paste it in appropriate jsp file of jsr 16
8 portlet but when I see th
at page at that time I can't see whole map.

I can see only some part of page... I don't know what's happening...

Below is that code of jsp file...

Can anyone please let me know why it is happening... I am also trying to att
ach screen shot of page...

I will appreciate your help...

Thanks,
HJ

-----------------------------------------------------------

<DIV >
<script src="http://maps.google.com/maps?file=api&v=2"
type="text/javascript"></script>
<body onunload="GUnload()">
<div id="map" style="width: 650px; height: 390px">
</div>
<noscript><b>JavaScript must be enabled in order for you to use 
Google Maps.</b> </noscript>

<script type="text/javascript">
if (GBrowserIsCompatible()) {

function createMarker(point,html) {
var marker = new GMarker(point);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
});
return marker;
}

// Display the map, with some controls and set the initial location
var map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.setCenter(new GLatLng(39.479395, 19.746094),1);

// Set up three markers with info windows

var point = new GLatLng(38.479395, 139.746094);
var marker = createMarker(point,'Marker 1')

map.addOverlay(marker);

// Asia
var point = new GLatLng(59.479395, 90.746094);
var marker = createMarker(point,'abc')
map.addOverlay(marker);

}

// display a warning if the browser was not compatible
else {
alert("Sorry, the Google Maps API is not compatible with this browser&q
uot;);
}

</script>
</body>

</DIV>
-----------------------------------------------------------





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 10:09 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register