Jump to content
uniGUI Discussion Forums
lema

Google Maps for uniGUI

Recommended Posts

Thank you.

 

Map does not refresh automatically maximized.

 

The method ResizeMap has already been implemented in component ,

but I forgot to call it on demo project.

 

Please , use the following:

 

procedure TxxxxForm.UniFormResize(Sender: TObject);
begin
 UniGMap1.ResizeMap;
end;

 

I will be add the missing procedure on the next demo release.

Share this post


Link to post
Share on other sites

New version

2012-10-27 v1.2.5
-- Started playing with Directions API.



The Demo shows how to get the instructions Array from Google API and show it into a UniDBGrid.

Tips:
Click on Grid to place a marker.
Click on map to find closest direction step.
Click on "get DirectionsResult" button to get the JSON containing the whole route

Share this post


Link to post
Share on other sites

New version

 

2012-10-27 v1.2.5

-- Started playing with Directions API.

 

See it in action here:

http://85.25.130.138/lema/uniGMapDemo.dll

 

The Demo shows how to get the instructions Array from Google API and show it into a UniDBGrid.

 

Tips:

Click on Grid to place a marker.

Click on map to find closest direction step.

Click on "get DirectionsResult" button to get the JSON containing the whole route

 

Great, thenk you for this.

Share this post


Link to post
Share on other sites

New version

 

2012-10-27 v1.2.5

-- Started playing with Directions API.

 

See it in action here:

http://85.25.130.138/lema/uniGMapDemo.dll

 

The Demo shows how to get the instructions Array from Google API and show it into a UniDBGrid.

 

Tips:

Click on Grid to place a marker.

Click on map to find closest direction step.

Click on "get DirectionsResult" button to get the JSON containing the whole route

 

 

New version 2012-10-27 v1.2.6

Fixed unicode bugs

Share this post


Link to post
Share on other sites

Hi Lema,

 

just trying this out in Delphi DX2

 

getting error UniGMap property version does not exist, have i done something wrong?

 

Thank you

 

New version

 

2012-10-27 v1.2.5

-- Started playing with Directions API.

 

See it in action here:

http://85.25.130.138/lema/uniGMapDemo.dll

 

The Demo shows how to get the instructions Array from Google API and show it into a UniDBGrid.

 

Tips:

Click on Grid to place a marker.

Click on map to find closest direction step.

Click on "get DirectionsResult" button to get the JSON containing the whole route

Share this post


Link to post
Share on other sites

Hi Lema,

 

just trying this out in Delphi DX2

 

getting error UniGMap property version does not exist, have i done something wrong?

 

Thank you

 

Did you get this error while trying to run the included demo?

Share this post


Link to post
Share on other sites

Hi,

 

yes with the demo, and also if i put a new map on and run it as a blank.

 

thanks

 

Did you get this error while trying to run the included demo?

Share this post


Link to post
Share on other sites

Hi,

 

Got it to work, something was conflicting with the older version.

 

all working now, thank you

 

 

Hi,

 

yes with the demo, and also if i put a new map on and run it as a blank.

 

thanks

Share this post


Link to post
Share on other sites

Hi Lema,

 

Fantastic work, thank you for your hard work.

 

can we have more than 1 destination in the direction side, so it can start from A to B to C etc.

 

Thank you

Share this post


Link to post
Share on other sites

area not be displayed! :(

 

Yes , I know.

But , this is not a bug.

 

Please see below:

https://developers.google.com/maps/documentation/javascript/layers#KMLLayers

 

The Google Maps API supports the KML and GeoRSS data formats for displaying geographic information.

These data formats are displayed on a map using a KmlLayer object,

whose constructor takes the URL of a publicly accessible KML or GeoRSS file.

 

So , when you are working on localhost or local networks will show nothing :(

 

For debug purposes , I suggest to upload the KML to a publicly accessible location where google API can have access and just

pass the URL to component, as I did into the demo:

 

 KML.KMLAddress := 'http://85.25.130.138/kml/pentagon.kml';

Share this post


Link to post
Share on other sites

Hi, Lema.

 

Where do I have to write my google apikey?

 

Thanks

--------------------

 

Well, I find the place in constructor TUniGMap.Create. I put my google api key and rebuild but I still receive the following error:

 

Google has disabled use of the Maps API for this application. The provided key is not a valid Google API Key, or it is not authorized for the Google Maps Javascript API v3 on this site. If you are the owner of this application, you can learn about obtaining a valid key here: https://developers.google.com/maps/documentation/javascript/tutorial#Obtaining_Key

 

--------------------

I found the solution: I change the name of the project for the one that I registered in google.

Share this post


Link to post
Share on other sites

Hi, Lema.

 

Where do I have to write my google apikey?

 

Thanks

--------------------

 

Well, I find the place in constructor TUniGMap.Create. I put my google api key and rebuild but I still receive the following error:

 

Google has disabled use of the Maps API for this application. The provided key is not a valid Google API Key, or it is not authorized for the Google Maps Javascript API v3 on this site. If you are the owner of this application, you can learn about obtaining a valid key here: https://developers.google.com/maps/documentation/javascript/tutorial#Obtaining_Key

 

--------------------

I found the solution: I change the name of the project for the one that I registered in google.

 

 

Did you rebuild the UniGMap package or just your project?

The Delphi Project name or the Google API Project name doesn't make a difference.

 

Of course you have to add the allowed referers in API Key.

Share this post


Link to post
Share on other sites

The Google Maps API does not support a drag method for polygons.

I will try to find a way of implementing such a feature.

 

Of course, we can "move" the polygon programmatically,

with just adding an offset on Lat,Lng of every vertex.

Share this post


Link to post
Share on other sites

Hi lema,

 

Again thank you for unigmap.

 

İn demo, get direction method is not working.

 

When i click get the direction a file which name is JSON.txt is downloading.

 

How it works?

Share this post


Link to post
Share on other sites

Hi lema,

 

Again thank you for unigmap.

 

İn demo, get direction method is not working.

 

When i click get the direction a file which name is JSON.txt is downloading.

 

How it works?

 

I uploaded a new version which solves some compatibility problems.

Please try again.

Share this post


Link to post
Share on other sites

New version

 

2012-11-19 v1.2.9

-- Fixes some compatibility problems.

Share this post


Link to post
Share on other sites

×