Jump to content


Photo

Google Maps for uniGUI


  • Please log in to reply
416 replies to this topic

#41 Arvin Feng

Arvin Feng

    Advanced Member

  • Members
  • PipPipPipPip
  • 100 posts
  • LocationChina (青石)

Posted 31 October 2012 - 09:52 AM

area not be displayed! :(

Attached Files

  • Attached File  err2.png   764.26KB   39 downloads

  • 0

#42 lema

lema

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 353 posts

Posted 31 October 2012 - 04:20 PM

area not be displayed! :(


Yes , I know.
But , this is not a bug.

Please see below:
https://developers.g...ayers#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';

  • 0

#43 Arvin Feng

Arvin Feng

    Advanced Member

  • Members
  • PipPipPipPip
  • 100 posts
  • LocationChina (青石)

Posted 01 November 2012 - 09:37 AM

Thank you!!! :D

Attached Files

  • Attached File  ok.png   219.95KB   54 downloads

  • 0

#44 Alberto vesx

Alberto vesx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 472 posts

Posted 12 November 2012 - 05:52 PM

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.g...l#Obtaining_Key

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

#45 lema

lema

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 353 posts

Posted 13 November 2012 - 05:25 AM

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.g...l#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.
  • 0

#46 Arvin Feng

Arvin Feng

    Advanced Member

  • Members
  • PipPipPipPip
  • 100 posts
  • LocationChina (青石)

Posted 15 November 2012 - 02:12 AM

Hi Lema

How to drag the region?

thank you.

Attached Files

  • Attached File  a.png   70.4KB   29 downloads

  • 0

#47 lema

lema

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 353 posts

Posted 15 November 2012 - 11:51 AM

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.
  • 0

#48 Hayri Aslan

Hayri Aslan

    Advanced Member

  • Moderators
  • 432 posts
  • Locationİstanbul - Turkey

Posted 19 November 2012 - 06:27 PM

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?
  • 0

#49 lema

lema

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 353 posts

Posted 19 November 2012 - 08:51 PM

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.
  • 0

#50 lema

lema

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 353 posts

Posted 19 November 2012 - 09:07 PM

New version

2012-11-19 v1.2.9
-- Fixes some compatibility problems.
  • 0

#51 Alberto vesx

Alberto vesx

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 472 posts

Posted 19 November 2012 - 09:22 PM

New version

2012-11-19 v1.2.9
-- Fixes some compatibility problems.


Thank you.
  • 0

#52 test_wz

test_wz

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 20 November 2012 - 03:57 AM

Awasome!
  • 0

#53 Hayri Aslan

Hayri Aslan

    Advanced Member

  • Moderators
  • 432 posts
  • Locationİstanbul - Turkey

Posted 20 November 2012 - 06:46 AM

Thank You lema.
  • 0

#54 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 9874 posts

Posted 20 November 2012 - 05:54 PM

Very good. Thanks for sharing.
  • 0

#55 lema

lema

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 353 posts

Posted 21 November 2012 - 03:08 PM

New version

2012-11-21 v1.3.0
-- Improved cross browser compatibility

Tested with :
Firefox 17.0
Chrome 23.0.1271.64
IE 8.0.7601

Please , let me know if you have any problem with your browser.
  • 0

#56 Arvin Feng

Arvin Feng

    Advanced Member

  • Members
  • PipPipPipPip
  • 100 posts
  • LocationChina (青石)

Posted 22 November 2012 - 01:42 AM

Thank You lema.
  • 0

#57 lema

lema

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 353 posts

Posted 22 November 2012 - 10:04 PM

New version

2012-11-22 v1.3.1
-----------------------------------------
Added ability to show multiple maps on a form / page
Fixed bugs in Directions


My apologies for any inconvenience caused with those "everyday versions".
The unigmap is part of a project I am working on and
when we have a change affecting the component , I transfer it here.
  • 0

#58 Schuiab

Schuiab

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 318 posts

Posted 22 November 2012 - 10:08 PM

Thank you lema

could you do a sample with where you enter a postcode, and it returns the street name, if that's possible

Thank you
  • 0

#59 lema

lema

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 353 posts

Posted 22 November 2012 - 10:47 PM

Thank you lema

could you do a sample with where you enter a postcode, and it returns the street name, if that's possible

Thank you


Post code to Street name?
I think this not so much accurate because there are many streets with the same post code.
The best you can get is an area having that code or an address name in center of this area.

So , you can try with the current demo (tab "Geocoding" , form "Google Maps").
Fill the textbox with as much detail as you have .
For example (Greece , 11524) or (11524 , GR).
You will get the coordinates of the center of area having this post code.
After that , use these coordinates in order to get a human-readable address.
  • 0

#60 Schuiab

Schuiab

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 318 posts

Posted 22 November 2012 - 11:00 PM

Thanks lema,

by the way, the download link is not showing, so unable to get the latest version :(
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users