Hi, PERFECT ans usefull component !
Only one note – I use GMMarker (MarkerType=mtStyledMarker, StyledMarker.StyledIcon=siBubble). Is any way how to solve two markers at the same position (to be both visible) ? Can I define, which marker is visible “in the foreground” ? Now the bubble is on the top-right side from its coordinates, please, is possible to add new property of StyledMarker, which will define the bubble position from its coordinates (e.g. bpTopRight, bpBottomRight, bpBottomLeft, bpTopLeft) ? Than I can do two Markets (with fifferent text and color) at the same position and both visible (no overlay) … PLEASE, is possible to do it ???
Thx for answer and Regards.
Hi! I am facing an weird problem, maybe my fault. I try to plan a direction from point A to B, using Google Map site it will route accordingly, but when I try using the lib we get dsINVALID_REQUEST on a specific segment, others will work very fine. Is something else I should care?
Hi cadetill,
After having a first look at your components I was very impressed about its functions and features. Unfortunately I am now facing a problem using your lib in my office where the traffic goes through a proxy server. I tried to find out what to adjust in the properties but did not find any hint of proxy support. Can you please help me with this specific problem?
I am utilising the ‘OnKeyDown’ event of the form (KeyPreview is enabled) to trap the keyboard ‘Delete’ key. However if i click anywhere on the map and then press Delete the OnKeyDown handler is not called. Any ideas?
Hi, this looks like an excellent library. I was talking with a friend and we came up with an idea but not sure it is possible. From your knowledge of Google Maps, can you answer this question: given a GPS location (Lat/Lon?), can the program query the map or in some way find out if the given point is “on a roadway” or “on a feature”?
Say you are driving down a road with GPS enabled. You can look at your device and see for yourself that you appear to be on a roadway on the map.
But … can your application ask the map, “is this point on a roadway?” Perhaps, “does this point coincide with any known feature(s)? If so, what?”
So if you come to an intersection, the program can analyze your route, know you’re on a road and see, for example, that the road to the right is a dead-end or turns into a dirt road and can warn you.
It’s a simlar problem to knowing if a mouse cursor is over, say, a button. But you can map the cursor to the form and see if there’s an object below it. Can Google Maps tell you if there’s a road beneath the cursor (GPS point)?
This is a good question! Far as I have read about Google Maps API, this is not possible. However, if you find the solution, please, say me and I will try to implement into GMLib 🙂
Do you have some very simple demos of how to work out directions and distances travelled.
The Demos are great, but I’m just a hobbyist, and working out all of your code is really difficult for me.
Some simplified demos – 1 button – 2 edits (from, to) and a label to report miles (not KM) travelled would be fantastic.
Excellent library, shame about Google’s pricing policies.
I have one problem. The first time I drag pegman onto the map (having moved it using GeoCode away from the default centre), it shows streetview at the default centre (GMMap.RequiredProp.Center.Lat/Lng). Doing it a second time works fine. When I drag pegman, I can very quickly see the correct streetview, then this is overlaid with the wrong one.
My guess is that the streetview layer exists when the program starts, but is not visible. Dragging pegman makes it visible, which then provides the opportunity to close the layer. Dragging pegman a second time creates the layer at the correct position, then makes it visible.
hello
I put the control under the Xe6 installation is successful. Open the procedure in the demo, compile successfully, but the map shows don’t come out, need APIkey? How to operate, please help. Thank you very much
Hello,
this is GMInfoWindow open error:’41380908’is not a vaild floating point value, and AfterPageLoaded fired – first page tip: loaded. Google map can be opened, Chinese URL: http://ditu.google.cn/maps? Output=classic&dg=ctry. How to operate, please help?. Thank you very much
Hello.
1 Open the project “GMInfoWin_Demo.dproj”
2.Select package (doble click) “GMInfoWin_Demo.dproj”
3 Right click on “GMInfoWin_Demo.dproj” and click “Compile”, no error
4 click on the “Run Without Debugging”.
5 Tips: script error
The line: 56
Char:3
Error: ‘Google’ is not defined
Code: 0
URL:about:blank
Do you want to continue running the script on this interface
Yes no
Click “yes”
6 error for “‘41380908’is not a vaild floating point value”, whether it is calling the Google map web site, Chinese URL: http://ditu.google.cn/maps? Output=classic&dg=ctry.
How to operate, please help. Thank you very much, if it is convenient to add your Facebook account, convenient to ask you questions. Thanks a lot.
Hello,
I’m using your library for a year now, without any problem, but today I’ve faced an issue with the InfoWindow. When I try to use them, I receive ‘JSON’ is undefined, and script error in https://maps.gstatic.com/maps-api-v3/api/js/18/8/intl/hu_ALL/widgets.js at line 0, and error messages like this pop up. Could you check your GMInfoWindow demo? It produces the same errors.
Hello:
Use Xe6 to open ‘GMInfoWin_Demo’ project, compile successfully, but the map loading out. Your program has no errors. You are using which one Google map. Google map web site you visit China: http://ditu.google.cn/maps? Output=classic&dg=ctry, you can open the access. I can modify the Google maps in the program’s Web site? If I can, I how to modify.
Thank you very much
Hello
Thank you very much for your answer, the new version of what time release, we may use your control, if need us to pay, we can pay buy. Once again, thank you very much.
Thank you for a great job.
I tried to use your library, it works well, but I did not found any information on how to use KML layer.
I see that TGMMap’s Layers property has KML, I tried to set different values and include kml link to file under URL property, but, kml layer did not shown. Any idea on how to use/show kml file on map.
Thank you
Me neither can’t show an imported KML file, I read the article above, but my problem is not with IE…
The problem is that I can’t show a KML layer when using this the code :
Helo
I try to use your component in delphi 7 to find list 600 adres.
first 200 is OK but leter search works wrong. 100 list adreses 30 is OK.
How good look 600 adress in the loop in delphi 7.
Please Give me an example code.
Geocodification have some restriction from Google. For example, you only can do 8 or 10 geocodifications in a row. After that, you need to wait 1 second between geocodifications until a 2500 max per day.
Is for this, that the best practice is to have a process to do the geocodification and save the lat/lng into a database or something like this, and use it to show points on the map
I have said this many time, GMLib don’t has any restriction, all restrictions are from Google Maps API. If you like to know some restrictions here some links
gmlib it’s a great work, congratulations. I have the follows questions, how to get my location using some gmlib component? Is it possible get LatLong based on my Ip Adress like Google Maps do using html5?
By the moment, GMLib don’t have durationInTraffic property into TGMDirection.DirectoinRequest object. However, this property is only available to Google Maps API for Work customers. See API documentation.
Very interesting project. But there are some kind of bug.
I use Delphi 7.
Here my code:
procedure TForm1.BuDoClick(Sender: TObject);
var
i,j: Integer;
begin
GMGeoCode1.Marker.Clear;
GMGeoCode1.Geocode(EdAdress.Text);
if GMGeoCode1.GeoStatus = gsWithoutState then
Exit;
if GMGeoCode1.Count = 0 then
begin
ShowMessage('Can't find adress');
end
else
begin
for i := 0 to GMGeoCode1.Count-1 do
begin
GMGeoCode1.Marker.Add(GMGeoCode1.GeoResult[i].Geometry.Location.Lat,
GMGeoCode1.GeoResult[i].Geometry.Location.Lng,
GMGeoCode1.GeoResult[i].FormatedAddr);
GMGeoCode1.Marker.Items[i].MarkerType := mtStandard;
end;
GMMap1.RequiredProp.Zoom := StrToInt(EdZoom.Text);
GMMap1.RequiredProp.Center.Lat := RoundTo(GMGeoCode1.GeoResult[0].Geometry.Location.Lat,-6);
j:=0; while j<10 do begin j:=j+1; Sleep(10); Application.ProcessMessages(); end; /// without this work wrong
GMMap1.RequiredProp.Center.Lng := RoundTo(GMGeoCode1.GeoResult[0].Geometry.Location.Lng,-6);
EdCoord.Text:=GMMap1.RequiredProp.Center.ToUrlValue;
EdFullAdress.Text:=GMGeoCode1.GeoResult[0].FormatedAddr;
end;
end;
Without string j:=0; while j<10 do begin j:=j+1; Sleep(10); Application.ProcessMessages(); end; program work wrong – it’s don’t show center of coordinates.
You don’t need to create markers. If you set to True the GMGeoCode.PaintMarkerFound and you assign a TMarker object to the GMGeoCode.Marker property, then the markers are created automatically.
To center map, use GMMap.SetCenter method or the CenterMapToMarker method of a particular Marker
Awesome components! I need to display some boxes with text on a map, so I’m thinking 2 options:
– GMInfoWindow: but is it possible to remove the “close window x button”? I don’t want the user to be able to close the InfoWin
– GMMarker: how do I add text to the marker? I saw in your TGeometryClass demo that you were able to put numbers in the GMMarker. But this didn’t work for me, it still shows the classic marker with a black circle in the middle:
Do You have any intention to port this library to lazarus/FPC, there are a lot of us that can not afford buying Delphi for programming. FPC and Lazarus IDE are under continous development.
1.- You only need to change version into html.map, recompile resources with rc.cmd bat file and rebuild components. GMLib isn’t tested with new features, is possible that don’t work
2.- GMLib 1.x is closed. This new feature (and other) will be included into GMLib 2.x (all recoded).
All works well. However, if I change the destination address and call the same code again, the new route does display correctly, but the first route is still visible on the GMMap.
May I ask, how do I clear the old route from the map ?
Unfortunately I can’t calculate route with more than 8 points (I don’t get route from Google) . Can you public same sample code with calculation with for example 10 waypoints ?
You need to buy a key from Google, lowest cost of entry is $10,000 per year. It will be something like gme-yourcompanyname. You can put this in the GMMap.SPIKey field. Then check Resources\map.html in GMLib to ensure the javascript script specifies “&client=API_KEY” in the URL (it used to specify “&key=API_KEY”), recompiling if necessary.
Ok I will try. BTW key for 2500 requests/day for Google Maps Directions API is free. You can activate it here https://console.developers.google.com/apis/ after 2500 $0.50 USD / 1,000 additional requests, up to 100,000 daily
So after add GMMap.APIKey and change in map.html After TDirectionsRoute.Execute with 10 via points I get 1 in TDirectionsRoute.Count,but…TDirectionsRoute.DirectionsResult.Routes[0] is empty 🙁
I think we are not talking about the same things, Bartek.
1. The reason we have a Google Maps for Work is that [we think] it is required for licencing reasons (i.e. using Google Maps from a Delphi application not a publicly accessible website. We sure didn’t want to shell out $10,000!
2. The limit on waypoints, as cadetill has to point out more than he should, is a Google limit. Use the correct API key, and you get 25 waypoints.
3. My comments about changing map.html may have referred to GMLib 1.5.0, not 1.5.3. Sorry if there is confusion about this, I did not record exactly what we had to change, by version.
That’s a key, the old [free] way of using Google Maps. Maybe it works, maybe not. We think using maps as a non-web application is outside the Google licence terms
9.1 Free, Public Accessibility to Your Maps API Implementation.
9.1.1 General Rules.
Free access (no fees). Subject to Section 9.1.2 (Exceptions), your Maps API Implementation must be accessible to the general public without charge and must not require a fee-based subscription or other fee-based restricted access. This rule applies to Your Content and any other content in your Maps API Implementation, whether Your Content or the other content exists now or is added later.
Public access (no firewall). Your Maps API Implementation must not operate (i) only behind a firewall; or (ii) only on an internal network (except during the development and testing phase); or (iii) in a closed community (for example, through invitation-only access).
9.1.2 Exceptions.
Enterprise agreement with Google. The rules in Section 9.1.1 (Free access, Public access) do not apply if you have entered into a separate written agreement with Google (such as a Google Maps for Work agreement) or obtained Google’s written permission.
I have downloaded the GMLib components, however the main issue I have is searching for an address or postcode. It is not returning the correct result, or no results for post code search. How can we set the search filter types?
when searching for example Heathrow, it return only one result which is not correct one and is very different to google search, also no post code search works. Is there a property to set filters “or set the filters to none” to return all results.
Hi,
I just got a feedback that my software using GMLib 1.5.3 is not fully working any more. There is a script error when using StyledMarkers: “StyledIcon is not defined”.
I found the same proble here, together with a possible solution: http://stackoverflow.com/questions/37673654/google-maps-styledmarker-no-longer-working
But how can i fix this? Where do i have to copy the scriptfile to?
On some computers, there is another Scripterror when there is no internet connection available: “Google is not defined”
Hello,
I’ve read that with the new release you have added support for FMX. Does that mean that we can use for android/ios or there is no support for those platforms?
Best regards from Russia. After installing the 1.5.3 to Berlin on the component palette in all 4 components. (TGMInfoWindow,TGMGeocode,TGMGroudOverlay,TGMHeatmap). How to install GMLib appeared to all the components in Berlin?
Is there a way to show the map in Greek Language? It shows greek and english.
Also the translation is not working, selecting language to English, error messages apears in Spanish.
I am getting the same error as Lee Parvin commented. I use your libraries in a Delphi 7 project. Here the error message (a popup message over the map):
¿Desea continuar ejecutando scripts en esta página?
I haven’t changed the code for ages. But today a customer told us that the map wasn’t working anymore. I have checked it and it is true. Apparently the error happens after the “GMMapAfterPageLoaded(Sender: TObject;First: Boolean);” event is executed.
On further investigation the problem is with the IE version. To trigger the error you need to run the program with an older version of Internet Explorer eg IE Version 8.
Running the program with say IE Version 11 works OK.
on delphi seatlle 10
I install gmlib v1.5.3.
when i build demo project, work perfect
when i build my project a have err:
[dcc32 Error] WebControlVCL.pas(186): E2029 Identifier expected but ‘IMPLEMENTATION’ found
[dcc32 Fatal Error] GMMapVCL.pas(335): F2063 Could not compile used unit ‘WebControlVCL.pas’
Good morning,
Est_il always possible to show the weather forecast (Weather in Gmap)
If yes how, this does not work.
Was told myself I that this function was obsolete, is that that’s true?
Salutations
Hola cadetill! En primer lugar gracias por el gran componente! Estoy tratando de usarlo en Delphi Seattle FMX, pero no puedo. He instalado los paquetes como el archivo de instalación, pero no registra los componentes de FMX. No puedo encontrar componente GMMap. Él está trabajando correctamente para el FireMonkey?
Hello,
I have an application with delphi. I used GMMAp1. The program was working but now “Oops! There was a problem. This page could not load Google Maps properly. I’m getting the message. Would you help me with the subject, please.
Firstly I want to say thanks to for this library, by the way I’m using your library on my project until today but I think google maps changed to something and I try to test it on your megademo the both are have same issues. The issue is about java script, the map open but when I try to move or zoom in map the map closed yourself and Google gives to me problem message that is ” This page couldn’t load the map successfully, Check to java script for technical details. If you help me I’ll be pleased, best regards
Get you API key from google and set the property of your TGMMap with your key.
Also you have to do some modification in the map.html file and then rebuild the ressource with rc.cmd
you need to have this line corrected to
type=”text/javascript” src=”http://maps.google.com/maps/api/js?v=3.17&key=API_KEY&libraries=weather,panoramio,geometry,drawing,visualization”>
Atualizei a ultima versão no git, porem esta agora ocorrendo erro ao tentar efetuar operações no mapa , na versao anterior funciona corretamente, na ultima não, até o Megademo tambem não esta funcionando , tente ir em uma TMarker e clicar no centermap ocorre o erro.
Abaixo segue a linha do erro
function TCustomGMMap.Check: Boolean;
begin
if not Assigned(FWebBrowser) then
raise Exception.Create(GetTranslateText(‘No se ha especificado el objeto WebBrowser’, Language));
if not FActive then
raise Exception.Create(GetTranslateText(‘No está activo’, Language));
if not FDocLoaded then
raise Exception.Create(GetTranslateText(‘Página inicial aun no cargada’, Language)); <<<<<<<= O erro ocorre aqui , e sem tradução pois estou utilizando Portugues
Result := not (csDesigning in ComponentState);
end;
Atualizei a ultima versão no git, porem esta agora ocorrendo erro ao tentar efetuar operações no mapa , na versao anterior funciona corretamente, na ultima não, até o Megademo tambem não esta funcionando , tente ir em uma TMarker e clicar no centermap ocorre o erro.
Abaixo segue a linha do erro
function TCustomGMMap.Check: Boolean;
begin
if not Assigned(FWebBrowser) then
raise Exception.Create(GetTranslateText(‘No se ha especificado el objeto WebBrowser’, Language));
if not FActive then
raise Exception.Create(GetTranslateText(‘No está activo’, Language));
if not FDocLoaded then
raise Exception.Create(GetTranslateText(‘Página inicial aun no cargada’, Language)); < — O erro ocorre aqui , e sem tradução pois estou utilizando Portugues
Result := not (csDesigning in ComponentState);
end;
Is there any resolution to this issue? My customers and myself started getting this as of yesterday (16 May) when it had been working perfectly fine up to then. My customers have the release of GMLib which fixed the handling of the API Key but I pulled the latest code from GitHub yesterday and I still get the error.
Hi Cadetill, I’m not fluent in English. So I apologize in advance for mistakes.
I’m trying to understand your library. Library I liked. Many things I already have.
Now, I have a problem with the route through the GMDirection two points.
If possible, could you send a piece of code of this implementation?
I can calculate the distance between two points, but visually the route is not displayed
procedure TForm1.Button2Click(Sender: TObject);
var a,i,j,km : integer;
begin
if GMDirection1.DirectionsRequest.WaypointsList.Count 0 then
GMDirection1.DirectionsRequest.WaypointsList.Clear;
if GMDirection1.Count 0 then
for i := 0 to GMDirection1.Count-1 do
GMDirection1.Delete(i);
GMDirection1.DirectionsRequest.Origin.Address:=sEdit1.Text;
GMDirection1.DirectionsRequest.Destination.Address:=sEdit2.Text;
GMDirection1.Execute;
km:=0;
with GMDirection1.DirectionsResult[0] do
begin
if TTransform.DirectionsStatusToStr(Status) = ‘dsOK’ then
begin
for j := 0 to Routes[0].CountLeg – 1 do
km:=km+Routes[0].Leg[j].Distance.Value;
end
end;
km:=km div 1000;
sStatusBar1.Panels[4].Text:=inttostr(km)+’km’;
end;
we are using the latest version of the GMLib. Recently the markers aren’t depicted anymore on the map and the centering doesn’t work. Double clicking also doesn’t focus a marker. The code and program hasn’t been changed for over two years. Do you have any ideas what could be wrong?
Big problems for us this morning, all our customers report “pagina inicial aun no cargada”.
Our GMLib code (1.5.3, D2007) fails from today showing the error text in the title of this post. Nothing has changed, the error translates to “Home Page not uploaded”.
Using Fiddler, we can see that GMLib now fails to load…
because it no longer exists. We cannot find this file. Logging in to our GM portal, we see…
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, today being the 16th May.
In the meantime, we have downloaded and tested version 1.5.4, but the same happens. We note that there is a comment about this already (11 days old) here
I think the reference to MaxZoom.js is an error, we do not know how this came to be in map,html (having browsed the GitHub repository). We have gone back to ‘as doenloaded’ 1.5.3 and 1.5.4, the error remains the same. The changes we make from the downloaded code are two:
One, in GMMapVCL.pas
procedure TGMMap.LoadBlankPage;
begin
if not (FWebBrowser is TWebBrowser) then Exit;
Hello. I need your help plz. Map does not respond to the cursor movement and we can not move markers through the map. Also we get wrong position of InfoWindow for poliline. its goes to 0 coordinate.
I apologize in advance for my English.
We have long used your component “gmlib 1.5.3” in your software. And for all the time of work there were no problems. But from today on the Google map, working through the component, icons and lines are no longer displayed.
This problem can not be solved by changing the version of windows.
We still can not understand why the objects on the map suddenly stopped showing up. Maybe you can advise us something to solve this problem.
I installed the version of “1.5.4 Final”. I understand this is the latest version of the component. But unfortunately the problem remained. In my software, objects are created which when the application is launched are not visible on the map, and after the launch it is no longer possible to make them visible. As an experiment, I created a new project in which I created a visible object when I started it, the object was displayed, but it’s impossible to change its location by the event, which is very important. I have the impression that google company has forbidden to dynamically change the position of objects. What do you think about this?
First of all. Excellent component! It has been proven to be very useful!
Unfortunately, sometime very recently (probably the same time Google decided to push their new API version yesterday) the component stopped functioning for me. I believe I may be having the same issue as Sergey above. No markers or lines are being displayed. I was using version 1.5.3 up until today. I downloaded 1.5.5 today but that did not seem to fix the issue. Any advice you can offer would be very much appreciated!
That fixed it. Thank you! I think the problem was that I neglected to update my library path after installing. I installed to new folder and updated paths. All is now well. I shall see if I can find a donation 🙂
Objects on the map are still not visible.
A machine was chosen to find out the circumstances of the problem that occurred.
1) A computer running Windows 7 is a professional with installed SP1
2) Internet browser Internet Explorer 11.0.9600.17843
3) In the system registry in the “HKEY_CURRENT_USER \ Software \ Microsoft \ Internet Explorer \ Main \ FeatureControl \ FEATURE_BROWSER_EMULATIon” the name of the application is specified with the value 11999.
4) IE browser cache has been completely cleared
5) The gmlib 1.5.5 component is installed, the old version has been removed.
6) Development Environment Delphi 2007
7) A new simple experimental project is created using the WebBrowser component, GMap, GMMarker.
Revealed
1) The map displayed in the WebBrowser component does not interact with the form either, for example, the EventMouse event does not display coordinates when you move the mouse over the map.
2) Many layers are not displayed on the map. There is no layer of weather, transit
3) Not displayed on the map, many visual properties do not have the zoom sliders, the arrow moves the map.
4) No objects are drawn on the map after the map is initialized
Conclusion: the map is displayed and it can be manipulated, but there is absolutely no interaction with the map.
This problem became known on May 15, 2017. This date almost coincided with the mass virus attack “wanna cry”.
Hello. We use you component GMLib and have some qwestions.
Our main problem is that we can’t free memory closing the form with GmLib+TWebBrowser while main program is runing. It’s looks like TWebBrowser bugs.
We want to refuse from TWebBrowser and start to use TChromium. We download it from here https://github.com/hgourvest/dcef3 and installe. Then we set the following settings in gmlib.inc file,
// delphi XE7
{$IFDEF VER280}
{$DEFINE DELPHIXE7}
{.$DEFINE WEBBROWSER}
{$IFDEF WIN32}
{$DEFINE CHROMIUM}
{.$DEFINE CHROMIUMFMX}
{$ENDIF}
{$ENDIF} .
On compiling a project, it doesn’t understand some functions.
For example TWebChromium.SaveToJPGFile (FileName: TFileName) there is no such procedure, and so on. Can you implement Tchromium in your component or мaybe suggest a solution for us. Thx a lot for response.
I’m having issues using the map after loading i can briefly drag it but after that it stops responding to drags i’m also not able to click on the icons. to get there info. but i am able to zoom in and out.
today the gmlib stopped working. After the doMap-Command the map is never rendered. The TWebBrowser.Exec returns OLECMDERR_E_UNKNOWNGROUP, and loops forever. I also tried using the gmlib on different computers. My knowledge in this
topic is way too limited, hope you can shed some light on the problem and provide a fix.
GmLib works too well to move to another component.
Keep up the great work.
We have changed ours to 3.33, and removed the reference to specific version also. No dice. We hope to have fixed it very soon, and if we do, we will re-comment.
procedure TFContractsViewer.GMMapAfterPageLoaded(Sender: TObject; First: Boolean);
begin
if First then
GMMap.DoMap;
GMMapPageLoaded := True;
end;
…DoMap (i.e. GMMapAfterPageLoaded) is now being called too early. DoMap crashes, and this causes the looping. We trapped DoMap in Delphi, saved the params, and added it as a script…
script
DoMap(52.189746,- 2.215933,’mtROADMAP’,10,false,true,true etc.
script
body
html
…at the end of map.html (so that it would run last). We commented out the GMMapAfterPageLoaded code, rebuilt and reran. It worked fine. Brackets etc. removed from code otherwise it won’t post.
Not a permanent fix, but a clue to what is going on?
Are you going to release GMLIB for the new Delphi 10.3 Community Edition? I tried loading GMLibProject_D_Seattle10.groupproj from GMLIB 1.5.3 but it won’t compile in Delphi 10.3 Community.
There’s lots of buzz around this first free Delphi release, I was hoping GMLIB would follow. It would be a great loss not to be able to use GMLIB anymore. Great product btw!
Are you going to release GMLIB for the new Delphi 10.3 Community Edition? I tried loading GMLibProject_D_Seattle10.groupproj from GMLIB 1.5.3 but it won’t compile in Delphi 10.3 Community.
Hi, are you going to release GMLIB for the new Delphi 10.3 Community Edition? I tried loading GMLibProject_D_Seattle10.groupproj from GMLIB 1.5.3 but it won’t compile in Delphi 10.3 Community.
Would you please upload compiled GMap demos.
Hi odissey
No problem, you can download now the binary from the downloads section. However, you can make this binary yourself 😉
Regards
Great work!
I tried to install in XE5 but fails. Do you have plans to port? Thanks!
Hi Luciano
You can download it from the SVN directory, see http://code.google.com/p/gmlibrary/source/checkout
Regards
Hi, PERFECT ans usefull component !
Only one note – I use GMMarker (MarkerType=mtStyledMarker, StyledMarker.StyledIcon=siBubble). Is any way how to solve two markers at the same position (to be both visible) ? Can I define, which marker is visible “in the foreground” ? Now the bubble is on the top-right side from its coordinates, please, is possible to add new property of StyledMarker, which will define the bubble position from its coordinates (e.g. bpTopRight, bpBottomRight, bpBottomLeft, bpTopLeft) ? Than I can do two Markets (with fifferent text and color) at the same position and both visible (no overlay) … PLEASE, is possible to do it ???
Thx for answer and Regards.
Hi! I am facing an weird problem, maybe my fault. I try to plan a direction from point A to B, using Google Map site it will route accordingly, but when I try using the lib we get dsINVALID_REQUEST on a specific segment, others will work very fine. Is something else I should care?
Hi Magno
Send me a demo program that reproduce your problem and I will see what happend 🙂
Hi cadetill,
After having a first look at your components I was very impressed about its functions and features. Unfortunately I am now facing a problem using your lib in my office where the traffic goes through a proxy server. I tried to find out what to adjust in the properties but did not find any hint of proxy support. Can you please help me with this specific problem?
Hi Carsten
GMLib don’t access to the web directly, it use a TWebBrowser. Perhaps you can find your solution here.
Regards
Hi Cadetill,
I am utilising the ‘OnKeyDown’ event of the form (KeyPreview is enabled) to trap the keyboard ‘Delete’ key. However if i click anywhere on the map and then press Delete the OnKeyDown handler is not called. Any ideas?
Thanks
Hi Rob
This is not a problem of GMLib, this is a problem of TWebBrowser. It’s possible that you need to implement a hook o some think like this
Hi, this looks like an excellent library. I was talking with a friend and we came up with an idea but not sure it is possible. From your knowledge of Google Maps, can you answer this question: given a GPS location (Lat/Lon?), can the program query the map or in some way find out if the given point is “on a roadway” or “on a feature”?
Say you are driving down a road with GPS enabled. You can look at your device and see for yourself that you appear to be on a roadway on the map.
But … can your application ask the map, “is this point on a roadway?” Perhaps, “does this point coincide with any known feature(s)? If so, what?”
So if you come to an intersection, the program can analyze your route, know you’re on a road and see, for example, that the road to the right is a dead-end or turns into a dirt road and can warn you.
It’s a simlar problem to knowing if a mouse cursor is over, say, a button. But you can map the cursor to the form and see if there’s an object below it. Can Google Maps tell you if there’s a road beneath the cursor (GPS point)?
Thanks!
Hi David
This is a good question! Far as I have read about Google Maps API, this is not possible. However, if you find the solution, please, say me and I will try to implement into GMLib 🙂
Regards!
Does it support the geocoding API? Reverse geocoding may work.
Yes, you have the TGMGeocode component to do that. Geocoding and reverse geocoding work fine 🙂
It looks like you do. I’ll give that a try.
Hi.
Do you have some very simple demos of how to work out directions and distances travelled.
The Demos are great, but I’m just a hobbyist, and working out all of your code is really difficult for me.
Some simplified demos – 1 button – 2 edits (from, to) and a label to report miles (not KM) travelled would be fantastic.
Many thanks in advance.
Hi Stan
I want to do this small demo for you.
Regards
Hi,
Excellent library, shame about Google’s pricing policies.
I have one problem. The first time I drag pegman onto the map (having moved it using GeoCode away from the default centre), it shows streetview at the default centre (GMMap.RequiredProp.Center.Lat/Lng). Doing it a second time works fine. When I drag pegman, I can very quickly see the correct streetview, then this is overlaid with the wrong one.
My guess is that the streetview layer exists when the program starts, but is not visible. Dragging pegman makes it visible, which then provides the opportunity to close the layer. Dragging pegman a second time creates the layer at the correct position, then makes it visible.
How do I show the correct position first time?
Regards,
Dan
Hi Dan
Thanks for using GMLib. Please, add a new issue at page.
Thanks!
[…] Head over and check out the extensive documentation before downloading the Google Maps Library for F… […]
Please XE7 mappp 🙂
Next version Mehmet 😉
What is date new(XE7) versiyon.
soon, don’t worry 🙂
hello
I put the control under the Xe6 installation is successful. Open the procedure in the demo, compile successfully, but the map shows don’t come out, need APIkey? How to operate, please help. Thank you very much
Hi
which demo do you open? What’s the error? API Key is not necessary
Regards
Hello,
this is GMInfoWindow open error:’41380908’is not a vaild floating point value, and AfterPageLoaded fired – first page tip: loaded. Google map can be opened, Chinese URL: http://ditu.google.cn/maps? Output=classic&dg=ctry. How to operate, please help?. Thank you very much
Hi
Send me a demo program with the error because I don’t understand your problem
Thanks
Hello.
1 Open the project “GMInfoWin_Demo.dproj”
2.Select package (doble click) “GMInfoWin_Demo.dproj”
3 Right click on “GMInfoWin_Demo.dproj” and click “Compile”, no error
4 click on the “Run Without Debugging”.
5 Tips: script error
The line: 56
Char:3
Error: ‘Google’ is not defined
Code: 0
URL:about:blank
Do you want to continue running the script on this interface
Yes no
Click “yes”
6 error for “‘41380908’is not a vaild floating point value”, whether it is calling the Google map web site, Chinese URL: http://ditu.google.cn/maps? Output=classic&dg=ctry.
How to operate, please help. Thank you very much, if it is convenient to add your Facebook account, convenient to ask you questions. Thanks a lot.
Hi again
I have done steps 1 until 4 without any error. What do you want exactly? You can send me a email if you want.
Regards
Good Morning,
I’m with problem started last night, the following error occurs
“json” is not defined
url: https://maps.gstatic.com/maps-api-v3/api/js/18/8/intl/pt_br/widgets.js
someone could help me …
att
josé carlos
Hello,
I’m using your library for a year now, without any problem, but today I’ve faced an issue with the InfoWindow. When I try to use them, I receive ‘JSON’ is undefined, and script error in https://maps.gstatic.com/maps-api-v3/api/js/18/8/intl/hu_ALL/widgets.js at line 0, and error messages like this pop up. Could you check your GMInfoWindow demo? It produces the same errors.
Thanks,
Neo
Hi
Yes, I know this problem and I’m working to solve it as soon as possible
Sorry for the inconvenience
Regards
Good night,
When you hover over a point marked
Yesterday started giving this error:
Line: 188
Character: 942
Error: “JSON” is not defined
Code: 0
Url: about blank
I wonder what is wrong
I thank your attention
Hello:
Use Xe6 to open ‘GMInfoWin_Demo’ project, compile successfully, but the map loading out. Your program has no errors. You are using which one Google map. Google map web site you visit China: http://ditu.google.cn/maps? Output=classic&dg=ctry, you can open the access. I can modify the Google maps in the program’s Web site? If I can, I how to modify.
Thank you very much
Hi xuanyuanyumu
I don’t understand you. Can you explain more? Thanks
Regards
Hello:
I send you an e-mail, the e-mail address is: gmlib@cadetill.com. Described in great detail, you see.
Perfect. I have seen the problem, and it is reported and solved into new version 😉
Regards
Hello
Thank you very much for your answer, the new version of what time release, we may use your control, if need us to pay, we can pay buy. Once again, thank you very much.
Hi again
The new version is released. You can download it
Regards
你好
以前的版本如何卸载,当安装新版本的时候总是提示已经安装。
谢谢
Hello
How to uninstall the previous version, when installing the new version is always prompt has been installed.
Thank you
I tried to install in “c++ builder 2007” but fails. Who can help me ? Thanks!
Hi
I’m not a C++ programmer, I can’t help you to install it into 2007 version. I’m sorry
Hi. Nice, good job! I need this for HTML5 Builder. You consult me, please? Thank You. Pepa
I have send you an email
Regards
Thank you for a great job.
I tried to use your library, it works well, but I did not found any information on how to use KML layer.
I see that TGMMap’s Layers property has KML, I tried to set different values and include kml link to file under URL property, but, kml layer did not shown. Any idea on how to use/show kml file on map.
Thank you
Please read this article. If you don’t understand Spanish, please translate it or ask me 🙂
Regards
hello Mr Cadetill
First, thanks for this Library.
Me neither can’t show an imported KML file, I read the article above, but my problem is not with IE…
The problem is that I can’t show a KML layer when using this the code :
GMMap1.Layers.Kml.Url:=myURL+’\xyz.kml’;
GMMap1.Layers.Kml.Show:=True;
Any idea to solve the problem ?
Best regards.
Hi Hamza
Where is hosted your kml file? It must be hosted on the net, not into your PC
Regards
Helo
I try to use your component in delphi 7 to find list 600 adres.
first 200 is OK but leter search works wrong. 100 list adreses 30 is OK.
How good look 600 adress in the loop in delphi 7.
Please Give me an example code.
Best Regards
Gizmo
Sorry Gizmo, I don’t understand you. What do you want, geocode 600 addresses or put 600 markets on the map from lat/lng known?
Regards
Hi
I want geocode 600 addresses and show them on the map.
Regards
Gizmo
Geocodification have some restriction from Google. For example, you only can do 8 or 10 geocodifications in a row. After that, you need to wait 1 second between geocodifications until a 2500 max per day.
Is for this, that the best practice is to have a process to do the geocodification and save the lat/lng into a database or something like this, and use it to show points on the map
Regards
I know the restriction.
My code
——————————————————–
while not dataset.Eof do
begin
sleep(2000);
gGeoCode.Geocode(sAdress);
end;
———————————————————
and the first 200 addresses geocode is OK,
but later encoding a selective ,an average of once every 3 calls
Do you have any suggestions.
Regards
Hi!
I have the same issue too 🙁
I have a database, with lots of addresses (from – to) and it would be great if I could calculate the distance between the two point.
Unfortunately, without any delay, after the 5th geocodification, the “gGeoCode.Geocode(sAdress);” doesn’t give any result back.
With delay (sleep(1550)) it works until 80-100 geocodification, but then die again.
I tried to create the TMGeoCode, TGMDistance, and the other components create in runtime, doesn’t helped.
It looks like the TGMMap will be full (or I don’t know).
Have you any idea, how we could solve this issue?
Thanks : Zoltan
Hi
I have said this many time, GMLib don’t has any restriction, all restrictions are from Google Maps API. If you like to know some restrictions here some links
– General info: https://developers.google.com/maps/documentation/javascript/usage
– Directions: https://developers.google.com/maps/documentation/directions/usage-limits
– Geocoding limits usage: https://developers.google.com/maps/documentation/geocoding/usage-limits
– Elevation limits usage: https://developers.google.com/maps/documentation/elevation/usage-limits
– Distance-Matrix limits usage: https://developers.google.com/maps/documentation/distance-matrix/usage-limits
– Geolocation limits usage: https://developers.google.com/maps/documentation/geolocation/usage-limits
– Roads limits usage: https://developers.google.com/maps/documentation/roads/usage-limits
– Time Zone limits usage: https://developers.google.com/maps/documentation/timezone/usage-limits
Regards
Hi!
Do you think your maps would work with Turbo Delphi Professional 2006?
Thanks
Hi
At present, this isn’t into my roadmaps.
Great work!!!
i have a question. how can i download maps and use the programm in offline mode.
regards
Hi Moharram
You can’t work offline with GMLib
Dear Cadetill,
gmlib it’s a great work, congratulations. I have the follows questions, how to get my location using some gmlib component? Is it possible get LatLong based on my Ip Adress like Google Maps do using html5?
Sorry for the delay in the response.
No, with GMLib you can’t get your location because the webbroser need a physical confirmation to get it.
Regards
Hi,
Thank you for great components, it is a pleasure to use them.
I have one question…
Is it possible to calculate arrival time based on traffic in requested moment,
after you enter, orgin adress, destination adress?
Thx, H
Hi
By the moment, GMLib don’t have durationInTraffic property into TGMDirection.DirectoinRequest object. However, this property is only available to Google Maps API for Work customers. See API documentation.
Regards
Very interesting project. But there are some kind of bug.
I use Delphi 7.
Here my code:
procedure TForm1.BuDoClick(Sender: TObject);
var
i,j: Integer;
begin
GMGeoCode1.Marker.Clear;
GMGeoCode1.Geocode(EdAdress.Text);
if GMGeoCode1.GeoStatus = gsWithoutState then
Exit;
if GMGeoCode1.Count = 0 then
begin
ShowMessage('Can't find adress');
end
else
begin
for i := 0 to GMGeoCode1.Count-1 do
begin
GMGeoCode1.Marker.Add(GMGeoCode1.GeoResult[i].Geometry.Location.Lat,
GMGeoCode1.GeoResult[i].Geometry.Location.Lng,
GMGeoCode1.GeoResult[i].FormatedAddr);
GMGeoCode1.Marker.Items[i].MarkerType := mtStandard;
end;
GMMap1.RequiredProp.Zoom := StrToInt(EdZoom.Text);
GMMap1.RequiredProp.Center.Lat := RoundTo(GMGeoCode1.GeoResult[0].Geometry.Location.Lat,-6);
j:=0; while j<10 do begin j:=j+1; Sleep(10); Application.ProcessMessages(); end; /// without this work wrong
GMMap1.RequiredProp.Center.Lng := RoundTo(GMGeoCode1.GeoResult[0].Geometry.Location.Lng,-6);
EdCoord.Text:=GMMap1.RequiredProp.Center.ToUrlValue;
EdFullAdress.Text:=GMGeoCode1.GeoResult[0].FormatedAddr;
end;
end;
Without string
j:=0; while j<10 do begin j:=j+1; Sleep(10); Application.ProcessMessages(); end;
program work wrong – it’s don’t show center of coordinates.Hi
You don’t need to create markers. If you set to True the GMGeoCode.PaintMarkerFound and you assign a TMarker object to the GMGeoCode.Marker property, then the markers are created automatically.
To center map, use GMMap.SetCenter method or the CenterMapToMarker method of a particular Marker
Regards
Hi, can you show small example code to calculate distance between towns, thank you.
Hi Dom
You can see the MegaDemo for an example
Regards
[…] nicht diese sondern die Version. Alternative: http://sourceforge.net/projects/gmlibrary/ http://www.cadetill.com/gmlib_en/ Markus […]
why not available via svn on sourceforge?
it is best to update and maintain the sources !!!!
I will search a svn repository
Thanks!
Hi !
I just found the OSM after updating.
It seems that the RequiredProp.MapType is not working for OSM.
BTW: excellent work !
Into MegaDemo work fine. What’s your problem?
Regards
Hi!
Awesome components! I need to display some boxes with text on a map, so I’m thinking 2 options:
– GMInfoWindow: but is it possible to remove the “close window x button”? I don’t want the user to be able to close the InfoWin
– GMMarker: how do I add text to the marker? I saw in your TGeometryClass demo that you were able to put numbers in the GMMarker. But this didn’t work for me, it still shows the classic marker with a black circle in the middle:
GMMarker1.Items[0].Title:=’9′
Thanks,
Flavius
Do You have any intention to port this library to lazarus/FPC, there are a lot of us that can not afford buying Delphi for programming. FPC and Lazarus IDE are under continous development.
tormod skaret
Hi Tormod
Not by the moment, I’m sorry
Hello.
I own a list of several lat / long. It has a way of informing the list and Maps draw me the path done?
I tried once in GMDirections, but above an amount errors occurred.
This list can contain tens, hundreds and even thousands of data.
Thank’s and congratulations.
Jéter
With this amount of data, you can’t use GMDirections. Use instead GMPolylines
Hi!
For some reason does not work on Windows Xp, i get a script error, on Windows 7 everything works fine.
How can i solve this problem?
Best Regards,
Fenyo
Hi
Try with this http://www.cadetill.com/cosas-del-twebbrowser/
Hi,
Two questions, please.
1. GM API is now on version 3.23, map.html references 3.17. How safe is it to update version number? Will you be updating gmlib to use newer APIs?
https://developers.google.com/maps/documentation/javascript/releases
2. I need to use weight with heatmaps (see http://blog.smartbear.com/web-monitoring/the-heat-is-on-a-simple-guide-to-creating-heatmaps/ for example). I cannot see support for this in gmlib, have I missed this or do you plan to implement this in a new version?
Best regards,
Dan
Hi Dan
1.- You only need to change version into html.map, recompile resources with rc.cmd bat file and rebuild components. GMLib isn’t tested with new features, is possible that don’t work
2.- GMLib 1.x is closed. This new feature (and other) will be included into GMLib 2.x (all recoded).
Regards
Thanks.
What news of GMLib 2? Do you have a release date? And a new feature list?
We are awaiting this very urgently!
Best regards,
Dan
Hola,
May I ask for a little help please? When I display a route on a map like this …
if not gmmap.Active then
gmmap.Active := true;
GMMap.SetCenter(myLat, myLng);
GMMap.RequiredProp.Zoom := TrackBar1.Position;
oAddr := mmoFrom.Lines.Text;
oAddr := StringReplace(oAddr, #$D#$A, ”, [rfReplaceAll]);
GMDirection.DirectionsRequest.Origin.Address := oAddr;
dAddr := mmoTo.Lines.Text;
dAddr := StringReplace(dAddr, #$D#$A, ”, [rfReplaceAll]);
GMDirection.DirectionsRequest.Destination.Address := dAddr;
GMDirection.Execute;
All works well. However, if I change the destination address and call the same code again, the new route does display correctly, but the first route is still visible on the GMMap.
May I ask, how do I clear the old route from the map ?
Thank you for you time,
John.
Hi
Use GMDirection.Delete to delete first search
Regards
Thankyou, Xavier,
‘GMDirection.Delete’ ….. how did I miss that ?
GMLib is truly one of the most useful Delphi components. Thank you for sharing it.
Johnny.
Hi!
Can you compile this Lib for Delphi 5??
Thx
Hi Alex
No, sorry, I don’t will compile under D5
Hi..
Can you add support for 23 waypoints in direction calcualtion as described here https://developers.google.com/maps/documentation/directions/usage-limits when user add api key ?
Hi Bartek
Theoretically, GMLib have this support (no limitations by GMLib, only limitations by Google Maps API)
Unfortunately I can’t calculate route with more than 8 points (I don’t get route from Google) . Can you public same sample code with calculation with for example 10 waypoints ?
I can’t, sorry, I don’t have any Google API key 🙁
So how to provide google key for gmlib ? Where enter it ?
GMMaps have a property to put the API key
You need to buy a key from Google, lowest cost of entry is $10,000 per year. It will be something like gme-yourcompanyname. You can put this in the GMMap.SPIKey field. Then check Resources\map.html in GMLib to ensure the javascript script specifies “&client=API_KEY” in the URL (it used to specify “&key=API_KEY”), recompiling if necessary.
Ok I will try. BTW key for 2500 requests/day for Google Maps Directions API is free. You can activate it here https://console.developers.google.com/apis/ after 2500 $0.50 USD / 1,000 additional requests, up to 100,000 daily
And there is no change in statistics of use key = the key is not included in request 🙁
So after add GMMap.APIKey and change in map.html After TDirectionsRoute.Execute with 10 via points I get 1 in TDirectionsRoute.Count,but…TDirectionsRoute.DirectionsResult.Routes[0] is empty 🙁
Don’t changes any into map.html, only set GMMap.APIKey property
I set apikey,restore old map.html and still is the limit to 8 waypoints 🙁 With more the direction is not claculated
I think we are not talking about the same things, Bartek.
1. The reason we have a Google Maps for Work is that [we think] it is required for licencing reasons (i.e. using Google Maps from a Delphi application not a publicly accessible website. We sure didn’t want to shell out $10,000!
2. The limit on waypoints, as cadetill has to point out more than he should, is a Google limit. Use the correct API key, and you get 25 waypoints.
3. My comments about changing map.html may have referred to GMLib 1.5.0, not 1.5.3. Sorry if there is confusion about this, I did not record exactly what we had to change, by version.
4. The link you provided (https://console.developers.google.com/apis/) I don’t recognise, we have our own Google for Work Support Portal. This may be your problem.
This is my key AIzaSyDuLVE8Pi4yijEBuC7La0NY4ibrMtLmR7s – can You check it ? Is it working for you ?
That’s a key, the old [free] way of using Google Maps. Maybe it works, maybe not. We think using maps as a non-web application is outside the Google licence terms
https://developers.google.com/maps/terms#9-license-requirements
9.1 Free, Public Accessibility to Your Maps API Implementation.
9.1.1 General Rules.
Free access (no fees). Subject to Section 9.1.2 (Exceptions), your Maps API Implementation must be accessible to the general public without charge and must not require a fee-based subscription or other fee-based restricted access. This rule applies to Your Content and any other content in your Maps API Implementation, whether Your Content or the other content exists now or is added later.
Public access (no firewall). Your Maps API Implementation must not operate (i) only behind a firewall; or (ii) only on an internal network (except during the development and testing phase); or (iii) in a closed community (for example, through invitation-only access).
9.1.2 Exceptions.
Enterprise agreement with Google. The rules in Section 9.1.1 (Free access, Public access) do not apply if you have entered into a separate written agreement with Google (such as a Google Maps for Work agreement) or obtained Google’s written permission.
And the quota (usage) of Google Maps JavaScript API still 0 🙁
Hi,
is it possible to use AutoComplete editbox, and on click directly put in delphi compnent (edit box)?
Thank you, hrvica
This page is for GMLib only, sorry
For others questions, go to stackoverflow
Hi
I have downloaded the GMLib components, however the main issue I have is searching for an address or postcode. It is not returning the correct result, or no results for post code search. How can we set the search filter types?
For the search I am using
GMGeocode1.Geocode(anAddress);
Regards
MM
You can define the Region or the Bounds properties
when searching for example Heathrow, it return only one result which is not correct one and is very different to google search, also no post code search works. Is there a property to set filters “or set the filters to none” to return all results.
Hi
Is it possible to implement the following function which will return search results?
service.getPlacePredictions({ input: ‘Find_Me’ },
function(predictions, status) {
if(status==’OK’){
for(var i=0;i< 5;++i){
if(predictions[i]){
(function(i){
var n = document.getElementById('ol')
.appendChild(document.createElement('li')),
s = new google.maps.places
.PlacesService(n.appendChild(document.createElement('div'))),
p = predictions[i].description;
s.getDetails({reference:predictions[i].reference},
function(details,status){
n.appendChild(document.createTextNode(p));
n.appendChild(document.createElement('br'));
n.appendChild(document.createTextNode(
details.geometry.location.toString()));
});
})(i)
}
}
}}
);
}
Script error when using StyledMarker
Hi,
I just got a feedback that my software using GMLib 1.5.3 is not fully working any more. There is a script error when using StyledMarkers: “StyledIcon is not defined”.
I found the same proble here, together with a possible solution:
http://stackoverflow.com/questions/37673654/google-maps-styledmarker-no-longer-working
But how can i fix this? Where do i have to copy the scriptfile to?
On some computers, there is another Scripterror when there is no internet connection available: “Google is not defined”
Any idea what’s wrong?
Thanks
Thorsten
Please, read this post into my blog.
Regards
Thanks, working !
Does FMX support android device? i tried it on XE7 , but not showing GMMap on android,
Thank You
Hi
By the moment no Android/iOs support
Hello,
I’ve read that with the new release you have added support for FMX. Does that mean that we can use for android/ios or there is no support for those platforms?
Hi
By the moment no Android/iOs support
Hi there
Is it possible to have a dotted/dashed line in DirectionsRender.PolylineOptions like in Polylines???
Many thanks
Lee
No, sorry. It is not implemented
Will be a version for Delphi Berlin ?
GMLib 1.x is closed, but I will try to update it for Berlin in few weeks
Any idea when you will have a release for Berlin version?
You have Berlin verion on GitHub
Great. Thanks a lot
Cual es el límite de polígonos que se pueden dibujar con GMLIB.
Hola
GMLib no tiene ningún límite de nada. Los límites los marcará siempre la API de Google Maps
Best regards from Russia. After installing the 1.5.3 to Berlin on the component palette in all 4 components. (TGMInfoWindow,TGMGeocode,TGMGroudOverlay,TGMHeatmap). How to install GMLib appeared to all the components in Berlin?
Hi! Download latest version from GitHub
Please let me know when realse GMLibray of RAD Studio Berlin 10.1
You can download it from GitHub
Hi! Will be the version on RAD 10.1 Berlin for FMX?
By the moment, FMX don’t work with FMX
Hello,
Thank you for your very good Component!!
Is there a way to show the map in Greek Language? It shows greek and english.
Also the translation is not working, selecting language to English, error messages apears in Spanish.
Thanks
John
Hi
But… do you want show the map in Greek language or the error messages that send GMLib?
Hi there
Im using the latest version and it has been working fine. However, it appears to have stopped working.
Using the MegaDemo I get script error in http://maps.google.com/maps-api-v3/api/js/25/15/intl/en_gb/poly.js.
Has Google updated the API’s?
Many thanks
Lee
I have executed MegaDemo without errors. What do yo do to get this error?
Hello!
I am getting the same error as Lee Parvin commented. I use your libraries in a Delphi 7 project. Here the error message (a popup message over the map):
Error de script
Error en el script de esta página
Línea: 0
Carácter: 0
Error: Script error
Código: 0
URL: http://maps.google.com/maps-api-v3/api/js/25/15/intl/en_gb/poly.js
¿Desea continuar ejecutando scripts en esta página?
I haven’t changed the code for ages. But today a customer told us that the map wasn’t working anymore. I have checked it and it is true. Apparently the error happens after the “GMMapAfterPageLoaded(Sender: TObject;First: Boolean);” event is executed.
Hope this helps.
Many thanks!
Try with this
It worked!!! Excelent!
Thank you.
Hi there
On further investigation the problem is with the IE version. To trigger the error you need to run the program with an older version of Internet Explorer eg IE Version 8.
Running the program with say IE Version 11 works OK.
Many thanks
Lee
on delphi seatlle 10
I install gmlib v1.5.3.
when i build demo project, work perfect
when i build my project a have err:
[dcc32 Error] WebControlVCL.pas(186): E2029 Identifier expected but ‘IMPLEMENTATION’ found
[dcc32 Fatal Error] GMMapVCL.pas(335): F2063 Could not compile used unit ‘WebControlVCL.pas’
cadetill what’s the problem?
Have you add the Library path?
I will check again…
Good morning,
Est_il always possible to show the weather forecast (Weather in Gmap)
If yes how, this does not work.
Was told myself I that this function was obsolete, is that that’s true?
Salutations
weather layer is deprecated by Google Maps yet, I’m sorry
Hola cadetill! En primer lugar gracias por el gran componente! Estoy tratando de usarlo en Delphi Seattle FMX, pero no puedo. He instalado los paquetes como el archivo de instalación, pero no registra los componentes de FMX. No puedo encontrar componente GMMap. Él está trabajando correctamente para el FireMonkey?
Agradezco desde ya,
Gracias!
PS Lo siento por el idioma, google translator
Hola Tallys
Hoy por hoy, GMLib no es compatible con FMX
¡Gracias por la respuesta! ¿Hay alguna posibilidad de trabajar en FireMonkey en alguna versión futura?
Hola. Con tiempo y una caña voy a trabajar en ello 😉
Hello,
I have an application with delphi. I used GMMAp1. The program was working but now “Oops! There was a problem. This page could not load Google Maps properly. I’m getting the message. Would you help me with the subject, please.
It seems they are making changes to the API and this do that GMLib stops running for some time. If the errors continue I will try to fix it
hello,
It still does not work, it gives the same error again.
“Oops! Something went wrong.
This page didn’t load Google Maps correctly. See the JavaScript console for technical details”
I am seeing this error message as well, it has briefly started work again on and off.
Currently its now working.
The solution in this post
Hello Cadetill,
can you help me, please,
I am writing the following code, but only the latest rote seems, I want to see all the roots.
procedure TForm1.Button4Click(Sender: TObject);
var
i:integeR;
begin
GMMap1.DoMap;
GMMarker1.Add;
GMMarker1.Items[0].Position.Lat := 39.7589418925097;
GMMarker1.Items[0].Position.Lng := 37.0511508733034;
GMMarker1.Items[0].Title := ‘Orginal_Adress_0’;
GMMarker1.Items[0].Draggable := true;
GMMarker1.Items[0].Flat := true;
GMMarker1.Add;
GMMarker1.Items[1].Position.Lat := 39.7477962764368;
GMMarker1.Items[1].Position.Lng := 37.0212382078171;
GMMarker1.Items[1].Title := ‘Orginal_Adress_1’;
GMMarker1.Items[1].Draggable := true;
GMMarker1.Items[1].Flat := true;
GMMarker1.Add;
GMMarker1.Items[2].Position.Lat := 39.7488975147203;
GMMarker1.Items[2].Position.Lng := 37.0168179273605;
GMMarker1.Items[2].Title := ‘Orginal_Adress_2’;
GMMarker1.Items[2].Draggable := true;
GMMarker1.Items[2].Flat := true;
GMMarker2.Add;
GMMarker2.Items[0].Position.Lat := 39.7605073926379;
GMMarker2.Items[0].Position.Lng := 37.0257704705;
GMMarker2.Items[0].Title := ‘Destination_adress_0’;
GMMarker2.Items[0].Draggable := true;
GMMarker2.Items[0].Flat := true;
GMMarker2.Add;
GMMarker2.Items[1].Position.Lat := 39.744194444014;
GMMarker2.Items[1].Position.Lng := 37.027212157845;
GMMarker2.Items[1].Title := ‘Destination_adress_1’;
GMMarker2.Items[1].Draggable := true;
GMMarker2.Items[1].Flat := true;
GMMarker2.Add;
GMMarker2.Items[2].Position.Lat := 39.784194444014;
GMMarker2.Items[2].Position.Lng := 37.027212157845;
GMMarker2.Items[2].Title := ‘Destination_adress_2’;
GMMarker2.Items[2].Draggable := true;
GMMarker2.Items[2].Flat := true;
for i := 0 to 2 do
begin
GMDirection1.DirectionsRequest.Origin.LatLng.Lat := GMMarker1.Items[i].Position.Lat;
GMDirection1.DirectionsRequest.Origin.LatLng.Lng := GMMarker1.Items[i].Position.Lng;
GMDirection1.DirectionsRequest.Destination.LatLng.Lat := GMMarker2.Items[i].Position.Lat;
GMDirection1.DirectionsRequest.Destination.LatLng.Lng := GMMarker2.Items[i].Position.Lng;
GMDirection1.Execute;
end;
end;
write your APIkey to GMMap properties
Enter your APIkey in the GMMap properties
Hello
Firstly I want to say thanks to for this library, by the way I’m using your library on my project until today but I think google maps changed to something and I try to test it on your megademo the both are have same issues. The issue is about java script, the map open but when I try to move or zoom in map the map closed yourself and Google gives to me problem message that is ” This page couldn’t load the map successfully, Check to java script for technical details. If you help me I’ll be pleased, best regards
Thanks.
The solution in this post
Get you API key from google and set the property of your TGMMap with your key.
Also you have to do some modification in the map.html file and then rebuild the ressource with rc.cmd
you need to have this line corrected to
type=”text/javascript” src=”http://maps.google.com/maps/api/js?v=3.17&key=API_KEY&libraries=weather,panoramio,geometry,drawing,visualization”>
also replace this line
type=”text/javascript” src=”http://google-maps-utility-library-v3.googlecode.com/svn/trunk/styledmarker/src/StyledMarker.js”
with this line
type=”text/javascript” src=”https://cdn.rawgit.com/jacopotarantino/google-maps-utility-library-v3/master/styledmarker/src/StyledMarker.js”
The solution in this post
hello cadetill,
my project is not working, can you help me please ,
“Oops! Something went wrong. This page didn’t load Google Maps correctly. See the JavaScript console for technical details”
Use Apı key
The solution in this post
The solution in this post
cadetill,
very very very thanks
version 1.5 final and your Google api key in working (sorry for my english)
The solution in this post
hello
we have this problem too
pleas help use
“Oops! Something went wrong. This page didn’t load Google Maps correctly. See the JavaScript console for technical details”
thanks for your help
The solution in this post
we fixed problem with your solution.
i’m so thank’s for your help.thanks alot
Hello friends,
I want you to see the names of all the markers on the map all the time, do you know the necessary code?
After install why google map could not show on TBrowser?
sorry, I don’t understand you. What do you do?
hello cadetill,
We want to rotate map.is this possible in gmlib?
if possible how we can to do This?
Hello
Using the MegaDemo I get script error in http://maps.google.com/maps-api-v3/api/js/25/15/intl/en_gb/poly.js.
This is very similar to the post 54 by Lee Parvin.
Link to solve this only in spanish.
Could you explain in English how to solve this problem.
you can use the Google Translator 😉 But basically you need to add your application to the registry into the tree specified
Ola Cadetill
Atualizei a ultima versão no git, porem esta agora ocorrendo erro ao tentar efetuar operações no mapa , na versao anterior funciona corretamente, na ultima não, até o Megademo tambem não esta funcionando , tente ir em uma TMarker e clicar no centermap ocorre o erro.
Abaixo segue a linha do erro
function TCustomGMMap.Check: Boolean;
begin
if not Assigned(FWebBrowser) then
raise Exception.Create(GetTranslateText(‘No se ha especificado el objeto WebBrowser’, Language));
if not FActive then
raise Exception.Create(GetTranslateText(‘No está activo’, Language));
if not FDocLoaded then
raise Exception.Create(GetTranslateText(‘Página inicial aun no cargada’, Language)); <<<<<<<= O erro ocorre aqui , e sem tradução pois estou utilizando Portugues
Result := not (csDesigning in ComponentState);
end;
Olá Cadetill
Atualizei a ultima versão no git, porem esta agora ocorrendo erro ao tentar efetuar operações no mapa , na versao anterior funciona corretamente, na ultima não, até o Megademo tambem não esta funcionando , tente ir em uma TMarker e clicar no centermap ocorre o erro.
Abaixo segue a linha do erro
function TCustomGMMap.Check: Boolean;
begin
if not Assigned(FWebBrowser) then
raise Exception.Create(GetTranslateText(‘No se ha especificado el objeto WebBrowser’, Language));
if not FActive then
raise Exception.Create(GetTranslateText(‘No está activo’, Language));
if not FDocLoaded then
raise Exception.Create(GetTranslateText(‘Página inicial aun no cargada’, Language)); < — O erro ocorre aqui , e sem tradução pois estou utilizando Portugues
Result := not (csDesigning in ComponentState);
end;
Hello cadetill,
Is there any resolution to this issue? My customers and myself started getting this as of yesterday (16 May) when it had been working perfectly fine up to then. My customers have the release of GMLib which fixed the handling of the API Key but I pulled the latest code from GitHub yesterday and I still get the error.
Hi Cadetill, I’m not fluent in English. So I apologize in advance for mistakes.
I’m trying to understand your library. Library I liked. Many things I already have.
Now, I have a problem with the route through the GMDirection two points.
If possible, could you send a piece of code of this implementation?
send me your code by email 😉
I can calculate the distance between two points, but visually the route is not displayed
procedure TForm1.Button2Click(Sender: TObject);
var a,i,j,km : integer;
begin
if GMDirection1.DirectionsRequest.WaypointsList.Count 0 then
GMDirection1.DirectionsRequest.WaypointsList.Clear;
if GMDirection1.Count 0 then
for i := 0 to GMDirection1.Count-1 do
GMDirection1.Delete(i);
GMDirection1.DirectionsRequest.Origin.Address:=sEdit1.Text;
GMDirection1.DirectionsRequest.Destination.Address:=sEdit2.Text;
GMDirection1.Execute;
km:=0;
with GMDirection1.DirectionsResult[0] do
begin
if TTransform.DirectionsStatusToStr(Status) = ‘dsOK’ then
begin
for j := 0 to Routes[0].CountLeg – 1 do
km:=km+Routes[0].Leg[j].Distance.Value;
end
end;
km:=km div 1000;
sStatusBar1.Panels[4].Text:=inttostr(km)+’km’;
end;
Hello Cadetill,
we are using the latest version of the GMLib. Recently the markers aren’t depicted anymore on the map and the centering doesn’t work. Double clicking also doesn’t focus a marker. The code and program hasn’t been changed for over two years. Do you have any ideas what could be wrong?
Thank you in advance for your help,
Kind regards
Matthias
download latest version on github
Thank you for the Update of the Lib.
hi
in GMDirection unit
thiere is a problem in this code when was no response never finished.
ExecuteScript(‘GetDirections’, Params);
repeat
TGMGenFunc.ProcessMessages;
until (GetIntegerField(DirectionsForm, DirectionsFormResponse) = 1);
GetRetournedData;
hi
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;
download latest version on github
I have problem in same place – endless cycle..
download latest version on github
Hi, Cadetill,
Big problems for us this morning, all our customers report “pagina inicial aun no cargada”.
Our GMLib code (1.5.3, D2007) fails from today showing the error text in the title of this post. Nothing has changed, the error translates to “Home Page not uploaded”.
Using Fiddler, we can see that GMLib now fails to load…
http://gmlibrary.googlecode.com/svn/trunk/Resources/MaxZoom.js
because it no longer exists. We cannot find this file. Logging in to our GM portal, we see…
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, today being the 16th May.
In the meantime, we have downloaded and tested version 1.5.4, but the same happens. We note that there is a comment about this already (11 days old) here
https://github.com/cadetill/gmlib_v1/issues
Help, please!
I think the reference to MaxZoom.js is an error, we do not know how this came to be in map,html (having browsed the GitHub repository). We have gone back to ‘as doenloaded’ 1.5.3 and 1.5.4, the error remains the same. The changes we make from the downloaded code are two:
One, in GMMapVCL.pas
procedure TGMMap.LoadBlankPage;
begin
if not (FWebBrowser is TWebBrowser) then Exit;
FDocLoaded := False;
//TWebBrowser(FWebBrowser).Navigate(‘about:blank’);
TWebBrowser(FWebBrowser).HandleNeeded;
TWebBrowser(FWebBrowser).Navigate(‘http://teleceterahosted.co.uk’);
end;
Two, in map.html
key=API_KEY -> client=API_KEY
because we are using API for Business
download latest version on github
Hello. I need your help plz. Map does not respond to the cursor movement and we can not move markers through the map. Also we get wrong position of InfoWindow for poliline. its goes to 0 coordinate.
download latest version on github
I apologize in advance for my English.
We have long used your component “gmlib 1.5.3” in your software. And for all the time of work there were no problems. But from today on the Google map, working through the component, icons and lines are no longer displayed.
This problem can not be solved by changing the version of windows.
We still can not understand why the objects on the map suddenly stopped showing up. Maybe you can advise us something to solve this problem.
download latest version on github
I worked with version 1.5.4. Update helped. Thank you very much.
I installed the version of “1.5.4 Final”. I understand this is the latest version of the component. But unfortunately the problem remained. In my software, objects are created which when the application is launched are not visible on the map, and after the launch it is no longer possible to make them visible. As an experiment, I created a new project in which I created a visible object when I started it, the object was displayed, but it’s impossible to change its location by the event, which is very important. I have the impression that google company has forbidden to dynamically change the position of objects. What do you think about this?
Hi Cadetill,
First of all. Excellent component! It has been proven to be very useful!
Unfortunately, sometime very recently (probably the same time Google decided to push their new API version yesterday) the component stopped functioning for me. I believe I may be having the same issue as Sergey above. No markers or lines are being displayed. I was using version 1.5.3 up until today. I downloaded 1.5.5 today but that did not seem to fix the issue. Any advice you can offer would be very much appreciated!
first of all, uninstall GMLib, delete dcu and bpl files and reinstall GMLib. Let me know what happens after that
That fixed it. Thank you! I think the problem was that I neglected to update my library path after installing. I installed to new folder and updated paths. All is now well. I shall see if I can find a donation 🙂
Objects on the map are still not visible.
A machine was chosen to find out the circumstances of the problem that occurred.
1) A computer running Windows 7 is a professional with installed SP1
2) Internet browser Internet Explorer 11.0.9600.17843
3) In the system registry in the “HKEY_CURRENT_USER \ Software \ Microsoft \ Internet Explorer \ Main \ FeatureControl \ FEATURE_BROWSER_EMULATIon” the name of the application is specified with the value 11999.
4) IE browser cache has been completely cleared
5) The gmlib 1.5.5 component is installed, the old version has been removed.
6) Development Environment Delphi 2007
7) A new simple experimental project is created using the WebBrowser component, GMap, GMMarker.
Revealed
1) The map displayed in the WebBrowser component does not interact with the form either, for example, the EventMouse event does not display coordinates when you move the mouse over the map.
2) Many layers are not displayed on the map. There is no layer of weather, transit
3) Not displayed on the map, many visual properties do not have the zoom sliders, the arrow moves the map.
4) No objects are drawn on the map after the map is initialized
Conclusion: the map is displayed and it can be manipulated, but there is absolutely no interaction with the map.
This problem became known on May 15, 2017. This date almost coincided with the mass virus attack “wanna cry”.
What ways of solving the problem you can advise?
try to uninstall, delete all dcu and bpl and reinstall
Latest Version 1.5.5 fixed the showing of markers after googles update for me.
Thanks
Good day
After deleting the links in the “library patch” and reinstalling the component everything worked.
Thank you very much for your support.
I would like to ask you in the future, if possible, to include in “gmlib” the support of other mapping engines.
what mapping engine?
For example OpenStreetMap
Tem como pegar o nome do novo local quando arrastado o marcador do GMDirection?
ou pegar a nova distancia depois de arrastado?
Hello,
I am writing the following code, but only the latest rote seems, I want to see all the roots. Please help me.
procedure TForm1.Button4Click(Sender: TObject);
var
i:integeR;
begin
GMMap1.DoMap;
GMMarker1.Add;
GMMarker1.Items[0].Position.Lat := 39.7589418925097;
GMMarker1.Items[0].Position.Lng := 37.0511508733034;
GMMarker1.Items[0].Title := ‘Orginal_Adress_0’;
GMMarker1.Items[0].Draggable := true;
GMMarker1.Items[0].Flat := true;
GMMarker1.Add;
GMMarker1.Items[1].Position.Lat := 39.7477962764368;
GMMarker1.Items[1].Position.Lng := 37.0212382078171;
GMMarker1.Items[1].Title := ‘Orginal_Adress_1’;
GMMarker1.Items[1].Draggable := true;
GMMarker1.Items[1].Flat := true;
GMMarker1.Add;
GMMarker1.Items[2].Position.Lat := 39.7488975147203;
GMMarker1.Items[2].Position.Lng := 37.0168179273605;
GMMarker1.Items[2].Title := ‘Orginal_Adress_2’;
GMMarker1.Items[2].Draggable := true;
GMMarker1.Items[2].Flat := true;
GMMarker2.Add;
GMMarker2.Items[0].Position.Lat := 39.7605073926379;
GMMarker2.Items[0].Position.Lng := 37.0257704705;
GMMarker2.Items[0].Title := ‘Destination_adress_0’;
GMMarker2.Items[0].Draggable := true;
GMMarker2.Items[0].Flat := true;
GMMarker2.Add;
GMMarker2.Items[1].Position.Lat := 39.744194444014;
GMMarker2.Items[1].Position.Lng := 37.027212157845;
GMMarker2.Items[1].Title := ‘Destination_adress_1’;
GMMarker2.Items[1].Draggable := true;
GMMarker2.Items[1].Flat := true;
GMMarker2.Add;
GMMarker2.Items[2].Position.Lat := 39.784194444014;
GMMarker2.Items[2].Position.Lng := 37.027212157845;
GMMarker2.Items[2].Title := ‘Destination_adress_2’;
GMMarker2.Items[2].Draggable := true;
GMMarker2.Items[2].Flat := true;
for i := 0 to 2 do
begin
GMDirection1.DirectionsRequest.Origin.LatLng.Lat := GMMarker1.Items[i].Position.Lat;
GMDirection1.DirectionsRequest.Origin.LatLng.Lng := GMMarker1.Items[i].Position.Lng;
GMDirection1.DirectionsRequest.Destination.LatLng.Lat := GMMarker2.Items[i].Position.Lat;
GMDirection1.DirectionsRequest.Destination.LatLng.Lng := GMMarker2.Items[i].Position.Lng;
GMDirection1.Execute;
ShowMessage(inttostr(i));
end;
end;
Hello. We use you component GMLib and have some qwestions.
Our main problem is that we can’t free memory closing the form with GmLib+TWebBrowser while main program is runing. It’s looks like TWebBrowser bugs.
We want to refuse from TWebBrowser and start to use TChromium. We download it from here https://github.com/hgourvest/dcef3 and installe. Then we set the following settings in gmlib.inc file,
// delphi XE7
{$IFDEF VER280}
{$DEFINE DELPHIXE7}
{.$DEFINE WEBBROWSER}
{$IFDEF WIN32}
{$DEFINE CHROMIUM}
{.$DEFINE CHROMIUMFMX}
{$ENDIF}
{$ENDIF} .
On compiling a project, it doesn’t understand some functions.
For example TWebChromium.SaveToJPGFile (FileName: TFileName) there is no such procedure, and so on. Can you implement Tchromium in your component or мaybe suggest a solution for us. Thx a lot for response.
Hi!
Where can I download latest version 1.5.5? On the download section I can only see versions up to 1.5.3
Thanks a lot
Hi,
I’m having issues using the map after loading i can briefly drag it but after that it stops responding to drags i’m also not able to click on the icons. to get there info. but i am able to zoom in and out.
Thanks in advance for you help
Hello Cadetill,
today the gmlib stopped working. After the doMap-Command the map is never rendered. The TWebBrowser.Exec returns OLECMDERR_E_UNKNOWNGROUP, and loops forever. I also tried using the gmlib on different computers. My knowledge in this
topic is way too limited, hope you can shed some light on the problem and provide a fix.
GmLib works too well to move to another component.
Keep up the great work.
Thanks in advance for you help.
It is happening to everybody, we are trying to work out a fix. Google are no longer supporting the Javascript specified in map.html (ours is 3.27), see https://developers.google.com/maps/documentation/javascript/versions
We have changed ours to 3.33, and removed the reference to specific version also. No dice. We hope to have fixed it very soon, and if we do, we will re-comment.
Latest news: we still haven’t solved it, but
procedure TFContractsViewer.GMMapAfterPageLoaded(Sender: TObject; First: Boolean);
begin
if First then
GMMap.DoMap;
GMMapPageLoaded := True;
end;
…DoMap (i.e. GMMapAfterPageLoaded) is now being called too early. DoMap crashes, and this causes the looping. We trapped DoMap in Delphi, saved the params, and added it as a script…
script
DoMap(52.189746,- 2.215933,’mtROADMAP’,10,false,true,true etc.
script
body
html
…at the end of map.html (so that it would run last). We commented out the GMMapAfterPageLoaded code, rebuilt and reran. It worked fine. Brackets etc. removed from code otherwise it won’t post.
Not a permanent fix, but a clue to what is going on?
Hi, could you send the fonts? vencetex@hotmail.com
This works
https://stackoverflow.com/questions/51833246/gmlib-megademo-exe-wont-load
You still need to alter the Javascript version in map.html
Hi, could you send the fonts? vencetex@hotmail.com
Hello!
Are you going to release GMLIB for the new Delphi 10.3 Community Edition? I tried loading GMLibProject_D_Seattle10.groupproj from GMLIB 1.5.3 but it won’t compile in Delphi 10.3 Community.
There’s lots of buzz around this first free Delphi release, I was hoping GMLIB would follow. It would be a great loss not to be able to use GMLIB anymore. Great product btw!
Thanks,
Flavius
Hello!
Are you going to release GMLIB for the new Delphi 10.3 Community Edition? I tried loading GMLibProject_D_Seattle10.groupproj from GMLIB 1.5.3 but it won’t compile in Delphi 10.3 Community.
Thanks,
Flavius
Hi, are you going to release GMLIB for the new Delphi 10.3 Community Edition? I tried loading GMLibProject_D_Seattle10.groupproj from GMLIB 1.5.3 but it won’t compile in Delphi 10.3 Community.