Jump to content

Google Maps for uniGUI


lema

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.

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
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.

Link to comment
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

Link to comment
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

Link to comment
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?

Link to comment
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';

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...