Usuario anónimo  |  Ingresar  |  Regístrate
Mensaje dentro Bugs and Improvements

Dynamically added GMap

Responder 
#1 - 31/03/2010 13:01:12 Reporta abuso | Link permanente
scorp-d
Fecha de registro: 02/02/2009
1 post en todos los foros
Dynamically added GMap

Responder Citar

Have seensome people with the same kind of problem, without a solution,  so this post Issimply what was causing my problem, and how I solved it.


I havebeen using GoogleMaps.Subgurim since 3.2.1.0  and have successfully upgraded to 3.2.1.1 inthe past, but I was getting 2 exceptions when I tried  to upgrade to 3.2.1.2or newer, on all browsers.


Have found out that the first exception occurred because of thefollowing code:

 

DragZoomControl dragZoomControl = new DragZoomControl();

 

DragZoomOtherOptions dragZoomOtherOptions = new DragZoomOtherOptions();

dragZoomOtherOptions.buttonHTML = "Zoom";

 

dragZoomControl.dragZoomOtherOptions = dragZoomOtherOptions;

 

DragZoomBoxStyleOptions dragZoomBoxStyleOptions = newDragZoomBoxStyleOptions();

dragZoomBoxStyleOptions.opacity = 0.5;

dragZoomBoxStyleOptions.fillColor = Color.Blue;

dragZoomControl.dragZoomBoxStyleOptions =dragZoomBoxStyleOptions;

 

GControl dragzoom =new GControl(dragZoomControl,new GControlPosition(GControlPosition.position.Top_Left));

 

GMap1.Add(dragzoom);

The error occurredon line 2 in some dynamic file, where“DragZoomControl.prototype=new GControl();”is stated, and returns an MicrosoftJSCript-error which states that 'GControl' isn’t defined.

 

The secound exception occures on line 298 in the same dynamic file, butthe statement is “addEvent(window,'unload',GUnload);”, where it also returns an Microsoft JSCript-error which states that 'GUnload' isn’t defined.


Both errorsoccurred because I was adding the GMap dynamically onto a panel, so the problemwas solved when they were statically added to the page with visible = false.

The weird thingis that I worked perfectly before 3.2.1.2, but couldn’tfind a reason in the changelog.

 

Scorp-D

Volver arriba

Respuestas
De en 15
#2 - 07/04/2010 8:56:16 Reporta abuso | Link permanente
subgurim
Fecha de registro: 18/10/2006
2003 posts en todos los foros
RE: Dynamically added GMap

Responder Citar
Thanks!
Volver arriba
De en 15

Powered by Subgurim.NET