Use openInfoWindowHtml client side method
|
#1 -
31/03/2010 20:26:06
|
Reporta abuso
|
Link permanente
|
|
Use openInfoWindowHtml client side method
|
|
|
|
|
Has anyone figured out how to the
openInfoWindowHtml() method which is used to display the Info Window? I don't know if it is exposed within subgurim javascript. You cannot just call the object.method from javascript as the object is not found within the DOM.
EDITADO 4/10/2010 1:05:06 PM: word correction
|
|
|
|
|
|
#2 -
14/04/2010 8:32:30
|
Reporta abuso
|
Link permanente
|
|
RE: Use openInfoWindowHtml client side method
|
|
|
That's it ;)
You can take the GMap ID using GMap1.GMap_ID
|
|
|
|
|
|
|
#3 -
10/04/2010 1:02:19
|
Reporta abuso
|
Link permanente
|
|
RE: Use openInfoWindowHtml client side method
|
|
|
Well, I finally figured out the call to display the info window from javascript:
subgurim_GMap1.openInfoWindowHtml(new GLatLng(43.6632121,-79.340989),'hello'+gd(725)); GMap1 is the ID of the map control. I noticed this in the page output which was the result of my server side code creating the InfoWindow to display immediately when the page was refreshed. The second parameter corresponds to the HTML and the javascript properties of the InfoWindow class (gd(725) is one of my javascript functions to make an ajax call back to the server to retrieve the information for the InfoWindow).
So, all you need to do is wire up your client side handling to call this javascript method to display the InfoWindow without having to do a round trip to the server.
|
|
|
|
|
|
|
#4 -
07/04/2010 12:53:50
|
Reporta abuso
|
Link permanente
|
|
RE: Use openInfoWindowHtml client side method
|
|
|
Thanks for the answer but this did not answer the question. I would like to call directly from javascript the openInfoWindowHtml and not from the context of the map itself. I want to have a link on the page which when clicked will display the info window.
The only way around this is to refresh the entire page and have the InfoWindow displayed when the new version of the map is built which is expensive since I only really want to pop up the info window and not have to do a complete round trip back to the server.
|
|
|
|
|
|
|
|