¡Ayúdanos a traducir esta Web y consigue licencias gratis!
Usuario anónimo  |  Ingresar  |  Regístrate
Mensaje dentro General Discussions

Use openInfoWindowHtml client side method

Responder 
#1 - 31/03/2010 20:26:06 Reporta abuso | Link permanente
smithfx
Fecha de registro: 11/03/2010
7 posts en todos los foros
Use openInfoWindowHtml client side method

Responder Citar
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
Volver arriba

Respuestas
De en 15
#2 - 14/04/2010 8:32:30 Reporta abuso | Link permanente
subgurim
Fecha de registro: 18/10/2006
1972 posts en todos los foros
RE: Use openInfoWindowHtml client side method

Responder Citar
That's it ;)

You can take the GMap ID using GMap1.GMap_ID
Volver arriba

#3 - 10/04/2010 1:02:19 Reporta abuso | Link permanente
smithfx
Fecha de registro: 11/03/2010
7 posts en todos los foros
RE: Use openInfoWindowHtml client side method

Responder Citar
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.
Volver arriba

#4 - 07/04/2010 12:53:50 Reporta abuso | Link permanente
smithfx
Fecha de registro: 11/03/2010
7 posts en todos los foros
RE: Use openInfoWindowHtml client side method

Responder Citar
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.
Volver arriba

#5 - 07/04/2010 8:51:29 Reporta abuso | Link permanente
subgurim
Fecha de registro: 18/10/2006
1972 posts en todos los foros
RE: Use openInfoWindowHtml client side method

Responder Citar
Hi,
this methos is used here: http://googlemaps.subgurim.net/ejemplos/ejemplo_900_InfoWindow-con-icono.aspx
Volver arriba
De en 15

Powered by Subgurim.NET