Closed mehmetkocabas closed 7 years ago
Hi, I'm having the same problem, started this afternoon.
We have the same problem since yesterday.
Has anyone managed any solution to this problem ?
I'm also having the same problems, using GMLib 1.5.4!
Same problem here.
The GM Portal reports "The current Maps JavaScript API v3 experimental version (3.28) will become the release version on or shortly after May 16, 2017. Version 3.26 will be removed. Requests for 3.26 or any prior version will now be served version 3.27. Versioning documentation is available at: https://developers.google.com/maps/documentation/javascript/versions"
...which surely must be more than a coincidence, given that these issues began for us yesterday (16th May).
I did a small test. I changed line 5 from the file map.html from "\<meta http-equiv="X-UA-Compatible" content="IE=edge">" to "\<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE10">" and all wok fine on win10 ie: 11
for IE10 and IE9 work with \<meta http-equiv="X-UA-Compatible" content="IE=edge"> tested ot win7 IE9, IE10
after you change line you must run rc.cmd to create new resource files. then recompile component and install again. Library use resource file to store map.html and icons in exe
This is not a perfect solution, but I added this code to GMMap.pas and it works
// <-----added by me function GetIEVersion: integer; var res,main: string; I: Integer; begin with TRegistry.Create do try RootKey := HKEY_LOCAL_MACHINE; OpenKeyReadOnly('Software\Microsoft\Internet Explorer'); try Res := ReadString('svcVersion'); if Res = '' then Res := ReadString('Version'); if Res = '' then raise Exception.Create(''); except Res := '0'; end; CloseKey; finally Free; end;
for I := 1 to length(res) do begin if(res[i] = '.')then begin break; end; main := main + res[i]; end; result := StrToInt(main); end; // end------>
function TCustomGMMap.GetBaseHTMLCode: string; var List: TStringList; Stream: TResourceStream; begin Result := '';
List := TStringList.Create;
try
try
Stream := TResourceStream.Create(HInstance, RES_MAPA_CODE, RT_RCDATA);
List.LoadFromStream(Stream);
Result := List.Text;
//List.SaveToFile('d:\mapa.html');
Result := StringReplace(Result, C_API_KEY, FApiKey, []);
// <-----added by me
if(GetIEVersion3 >= 11)then
begin
Result := StringReplace(Result, '\<meta http-equiv="X-UA-Compatible" content="IE=edge">', '\<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE10">', []);
end;
// end------>
finally
if Assigned(Stream) then FreeAndNil(Stream);
if Assigned(List) then FreeAndNil(List);
end;
except
raise Exception.Create(GetTranslateText('No se ha podido cargar el recurso', Language));
end;
end;
The Google Map apparently has some problem with the execution of the code in internet explorer 11 after last changes
Found this on stackoverflow. http://stackoverflow.com/questions/44023810/gmlib-issue-search-direction-not-working
I temporary solved this problem in GMMap.pas unit
function TGMObjects.ExecuteScript(NameFunct, Params: string): Boolean; begin Result := False;
Map.FDocLoaded := true; <<- new line
if (csDesigning in ComponentState) or not Assigned(FMap) or
not Map.Active or not Map.FDocLoaded then Exit;
Result := FMap.ExecuteScript(NameFunct, Params);
end;
Fixed my "Página inicial aun no cargada" error, after load map.
test.exe http://dox.bg/files/dw?a=c07510b52a
in map.html change \<meta http-equiv='X-UA-Compatible' content='IE=edge'> to \<meta http-equiv="X-UA-Compatible" content="IE=edge"> and posted code will work
download the latest version from github and try again
there is a problem , it is giving "Página inicial aun no cargada" error, after load map