-
15. Re: rich gmap
saket80 May 11, 2010 9:26 PM (in response to derkd)Hi,
It is rendering now with adding onShow=map.checkResize at modelPanel.
Now the issue is since we have to use <f:view contentType="text/html"> to display map in safari as instructed by rich gmap.
Now my other command links is not working(blocked) on page because of addign the contentType. .. any suggestion.
-
16. Re: rich gmap
saket80 May 12, 2010 3:30 AM (in response to derkd)Hi,
I am trying to add the gmap at modelPanel in Safari, It did not render the map. but when i use the f:view contentType="text/html" then it works, but if i use this workaround then my all commandlinks on this page get blocked/disabled.I am using RF 3.3.3, this is urgent issue, Please help.MY code<rich:modalPanel id="storeLocationMapOverlay" autosized="true" top="100" onshow="map.checkResize()" ><div class="overlayTitle"> <h:outputText value="Store Location Map"/></div><f:facet name="controls"><h:graphicImage value="../content/images/closebox.png" onclick="Richfaces.hideModalPanel('storeLocationMapOverlay')"/></f:facet><h:form id="storeMapForm"><h:panelGrid id="mapGrid" styleClass="overlayPanel width500"><!--<div style="overlayPanel width500"><f:view contentType="text/html" > --><rich:gmap gmapVar="map" mapType="G_NORMAL_MAP" enableDragging="true" zoom="2"style="width: 500px; height: 400px;" showGMapTypeControl="false"gmapKey="ABQIAAAARGLSjsbAhg4dYB1UWUa5RxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxS_VJNFb4_Hg1PQG5eR_u6y_bKo5w"oninit="loadMap()"><script type="text/javascript">function loadMap(){var center = new GLatLng('#{storeController.storeBean.gpsX}', '#{storeController.storeBean.gpsY}');map.setCenter(center, 13);var marker = new GMarker(center, {draggable: true});GEvent.addListener(marker, "dragstart", function() {map.closeInfoWindow();});GEvent.addListener(marker, "dragend", function() {marker.openInfoWindowHtml("Just bouncing along...");});map.addOverlay(marker);}</script></rich:gmap></h:panelGrid><br/><br/><h:commandLink class="button" onclick="javascript:Richfaces.hideModalPanel('storeLocationMapOverlay')" value="#{msg.OVERLAY_CANCEL_BTN}"/></h:form></rich:modalPanel>ThanksSaket -
17. Re: rich gmap
derkd May 12, 2010 3:39 AM (in response to saket80)Hi,
It should work with safari! I also have the gmap in safari.
what happens if you open it in firefox with the viewtype removed? Try using firebug to see if the #{storeController.storeBean.gpsX}', '#{storeController.storeBean.gpsY} are set!
If all doesn't work try to set it in a page without the modal panel...
-
18. Re: rich gmap
saket80 May 12, 2010 1:40 PM (in response to derkd)Hi Derk,
Thanks for quick response, I have tried with firefox and it works in model panel as well on page without setting view content Type
,I have tried to set the rich map directly on page but still does not showup, I also compare the view source of page and it does not look different. I could see the gpsX and Y values.. any pointer please?
</script><div id="baselineStore:j_id62" style="width: 500px; height: 400px;"><script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAARGLSjsbAhg4dYB1UWUa5RxT2yXp_ZAY8_ufC3CFXhHIE1NvwkxS_VJNFb4_Hg1PQG5eR_u6y_bKo5w&hl=en_US" type="text/javascript"></script><script type="text/javascript">
//<![CDATA[
function __initGMap() { __initGmapdiv("map","baselineStore:j_id62", "Your browser does not support Google Maps");
__applyGmapparam("map",37.9721046, -122.0424842834,2,G_NORMAL_MAP,true,true,false,false,false,true,true);
var userfunc = function(event) { loadMap() }; userfunc();};__addLoadEvent(__initGMap);__addUnLoadEvent(GUnload);//]]>
</script></div> -
19. Re: rich gmap
saket80 May 14, 2010 8:34 PM (in response to saket80)Hi Derk,
I did not get solution for my problem , please help.
thanks