Hola:
Mi Nombre es Luis desde Argentina, ya he hecho esta pregunta, pero la respuestas no me han dado resultado. EL tema es asi, hace ya 3 o 4 años que tengo lagunas lisc de los componentes entre ellos los de Google Map. He seguido los ejemplos los he ejecutado sin problema. Hice mi Api Key y todo lo que hay que hacer. Yo Tengo desarrolado un ERP en el cual agregue una pantalla para geolocalizar los clientes, por su direccion ( vi tambien que se puede obtener el codigo postal, no se como hacerlo). el sistema funciona en formato MDI, el tema es que cuando abro la pantalla el mapa no se ve, SI en tiempo de ejecucion paso a TMSFNCMaps1.Service := msHere; si veo ese mapa pero en TMSFNCMaps1.Service := msGoogleMaps; lo que mas me da incertidumbre que si estoy en el editor de Delphi, si veo el mapa en tiempo de diseño. Alguna SUgerencia?
Hi,
Do you see a white window in place of the map or an error message?
Can you please make sure the APIKey property is set correctly at run time?
If the problem persists, please provide the following information so I can further investigate this.
- Are you using the latest version of TMS FNC Maps?
- Which OS are you running your application on?
- Which version of Delphi are you using
- Does the issue also happen in a new application that only contains a TTMSFNCMaps component?
- Do you see any JavaScript errors? (click on the map at run-time and press F12 to display the browser developer tools, then select the "console" tab)
Hola...
si aparece una pagina en blanco.
Delphi 11.1
WIndows 10
la version que me aparece en TMSFNCMaps es 2.0.3.0
y cuando queres ver el mapa dentro del programa
Uncaught ReferenceError: s is not defined
at loadMap (about:blank:1141:16)
at waitForMapInitialized (about:blank:1134:5)
En la página HTML, el div con id="mapContainer" queda vacío.
This issue has already been fixed.
Can you please make sure you are using the latest version of TMS FNC Maps?
Acabo de bajar la ultima version y sigue igual. el mismo efecto
We are not aware of any issues with the current version of TMS FNC Maps.
Does the issue also happen in the demo applications?
Hola
No ... hice un proyecto nuevo, y no me hace ese problema. Pero no puedo saber donde esta el conflicto, como se puede hacer si hay una unit o algo que me pueda generar esto. Si me pueden ayudar lo agradeceria. Por que no puedo usarlo. en donde lo necesito y no se por deonde buscar.
Gracias
Please try the following with the application that has the issue:
- Clean and rebuild the application
- Disable different parts of the code and check if that changes the behavior
- Add an extra map component to check if that works or not
If the problem persists, please provide a ready to run project that demonstrates the issue so I can further investigate this.
Hola
Hace Tempo que empece este Hilo, no lo continue porque me dedique a otras parts de mi sistema, sigo con el problea de que no se ve el mapa de Google, su puedo ver en OpenLayers pero no en los demas,
He sacado del formulario todas las units y compile para que las reingrese de nuevo y aun asi no he podido solucionar, tengo la ultima version instalada y no se que mas hacer.
Gracias
Does the map work when you start a new application that only contains TMSFNCMaps component?
-
Yes: There must be a specific issue in your application. Please provide a ready to run sample project that demonstrates the issue so I can further investigate this here.
-
No: Please make you are using the latest TMS FNC Maps version and a valid API key. Do you see any JavaScript errors? (click on the map at run-time and press F12 to display the browser developer tools, then select the "console" tab)
If so, please provide a screenshot of the error.
Hi,
I had a similar problem: in my case, the problem was the use of TrueBoolStrs: if (Length(TrueBoolStrs) > 0) and (TrueBoolStrs[0] <> 'True'), then white window....
You can easily reproduce the bug in a new project putting this code in form creation:
procedure TForm1.FormCreate(Sender: TObject);
begin
SetLength(TrueBoolStrs, 1);
TrueBoolStrs[0] := 's';
end;
Please note that TMSFNCMaps component is only compatible with default values of TrueBoolStrs.
Solved setting to False the second parameter of BoolToStr(B: Boolean; UseBoolStrs: Boolean = False) in the functions TTMSFNCMapsGoogleMaps.GetInitializeMap and TTMSFNCCustomGoogleMaps.GetCustomMap; in this way BoolStrs arrays are not used at all.
In source code there are a lot of BoolToStr calls with the parameter UseBoolStrs set to True; maybe they are to be changed too.
TMSFNCMaps is using JSON behind the scenes, which uses true & false as words for boolean values, so we can't simply change the code because BoolToStr without UseBoolStrs will render the string as -1 or 0, which is not compatible with JSON.
Ok, why not use your own function returning 'false' or 'true'? Am I missing something? Thanks.
Hi, sorry, but your code is incorrect: you must use the constants ‘false’ and ‘true’, not the function BoolToStr
, which can return any value if the variables TrueBoolStrs
and FalseBoolStrs
are modified for localization. BoolToStr
should be used for the user interface, not for JavaScript coding.
Please, correct this issue; why do you use BoolToStr? I don't understand.
Again, because TMS FNC Maps uses JSON, and JSON supports only “true” and “false” als values for BOOLEAN data types, we cannot support custom strings for BOOLEAN unfortunately, I understand that we can manually patch the sources to use hardcoded true and false instead, so we’ll see if we can work around this however, our engine parsing JSON uses RTL functionality that expects the default values to exist
RTL allows customization of the BoolToStr result through the variables TrueBoolStrs and FalseBoolStrs for localization purposes. You cannot assume it always returns 'true' and 'false'.
As mentioned, we'll see if we can implement a workaround in our sources.