Jump to content

Google Maps for uniGUI


lema

Recommended Posts

Hi All

Can someone tell me how to install this component.

 

Russell

 

open the project file got unigMap then in the required section delete all required, rebuild and it will put required files back that it needs, then install

Link to comment
Share on other sites

  • 2 weeks later...

Hi

Wonder if you can help me.  I cannot get the mapclick event to fire in my own test project.

 

I have a form, 2 edit boxes and unigmap component, nothing too complicated.

 

procedure TMapForm.UniGMap1AjaxEvent(Sender: TComponent; EventName: string;
  Params: TStrings);
var
  lat, lng: string;
begin

  if (EventName = 'mapclick')  then
  begin
    lat := StringReplace(Params.Values['lat'], '.', ',', [rfReplaceAll]);
    lng := StringReplace(Params.Values['lng'], '.', ',', [rfReplaceAll]);

   latdec.Text := lat;
   londec.Text := lng;
  end; // mapclick

end;

 

Russell

Link to comment
Share on other sites

  • 2 weeks later...

Hi

Wonder if you can help me.  I cannot get the mapclick event to fire in my own test project.

 

I have a form, 2 edit boxes and unigmap component, nothing too complicated.

 

procedure TMapForm.UniGMap1AjaxEvent(Sender: TComponent; EventName: string;

  Params: TStrings);

var

  lat, lng: string;

begin

 

  if (EventName = 'mapclick')  then

  begin

    lat := StringReplace(Params.Values['lat'], '.', ',', [rfReplaceAll]);

    lng := StringReplace(Params.Values['lng'], '.', ',', [rfReplaceAll]);

 

   latdec.Text := lat;

   londec.Text := lng;

  end; // mapclick

 

end;

 

Russell

 

Hello ,

Could you please attach a demo project to help me reproduce this issue?

Link to comment
Share on other sites

  • 2 weeks later...

Hi Iema

I have just installed the latest version of unigui to date and then re-installed the unigmap component.  I am getting the message below.

 

[dcc32 Fatal Error] Main.pas(9): F2051 Unit UniGMap was compiled with a different version of uniGUIApplication.UniSession

 

Could you possibly tell me where I am going wrong,  sure there is a simple solution.

 

All the best

 

Russell

Link to comment
Share on other sites

Hi Iema

I have just installed the latest version of unigui to date and then re-installed the unigmap component.  I am getting the message below.

 

[dcc32 Fatal Error] Main.pas(9): F2051 Unit UniGMap was compiled with a different version of uniGUIApplication.UniSession

 

Could you possibly tell me where I am going wrong,  sure there is a simple solution.

 

All the best

 

Russell

You must rebuild the component

Link to comment
Share on other sites

Hi Iema

I have just installed the latest version of unigui to date and then re-installed the unigmap component.  I am getting the message below.

 

[dcc32 Fatal Error] Main.pas(9): F2051 Unit UniGMap was compiled with a different version of uniGUIApplication.UniSession

 

Could you possibly tell me where I am going wrong,  sure there is a simple solution.

 

All the best

 

Russell

 

Hello Russell.

 

As Alberto said in previous post, you have to rebuild the unigmap package.

Also, make sure that you have completely uninstall any previous version (remove bpl / dcu files) before rebuilding.

Link to comment
Share on other sites

Hello lema.

 

I've seen your examples and they're pretty nice. I'm using the feature "Route" to trace a route between 2 coordinates. So far it's ok, but I need to get the polylines among the route to compute a more accurate distance between my origin and destination. Is it possible to do it?

 

Thank you.

 

 

Renato

Link to comment
Share on other sites

Hello lema.

 

I've seen your examples and they're pretty nice. I'm using the feature "Route" to trace a route between 2 coordinates. So far it's ok, but I need to get the polylines among the route to compute a more accurate distance between my origin and destination. Is it possible to do it?

 

Thank you.

 

 

Renato

 

Hello Renato.

 

I don't think that we can have more accurate computation of distance than Google.

 

But , if you want the full point list of each step , see the the UniDBGrid1CellClick procedure of DirectionsForm in demo project.

If you iterate through these points you can calculate the progressive distance.

 

You will also need the functions TUniGMap.DecodeLatLngPath and TUniGMap.ComputeDistanceBetween.

Link to comment
Share on other sites

Hello Renato.

 

I don't think that we can have more accurate computation of distance than Google.

 

But , if you want the full point list of each step , see the the UniDBGrid1CellClick procedure of DirectionsForm in demo project.

If you iterate through these points you can calculate the progressive distance.

 

You will also need the functions TUniGMap.DecodeLatLngPath and TUniGMap.ComputeDistanceBetween.

 

Hi lema.

 

Sorry bothering you. 
I forgot completely about your demo source files. I saw that you use "OnAjaxEvent" to get that information and I was looking for it in the component properties.
Now I think I can get what I need.

 

 

Thank you.

 

 

Renato

Link to comment
Share on other sites

Hello Renato.

 

I don't think that we can have more accurate computation of distance than Google.

 

But , if you want the full point list of each step , see the the UniDBGrid1CellClick procedure of DirectionsForm in demo project.

If you iterate through these points you can calculate the progressive distance.

 

You will also need the functions TUniGMap.DecodeLatLngPath and TUniGMap.ComputeDistanceBetween.

 

Hi. Please dpk for Delphi XE4, the one that is attached to the cap threads is not installed :(

Thanks!!!

Link to comment
Share on other sites

Hi. Please dpk for Delphi XE4, the one that is attached to the cap threads is not installed :(

Thanks!!!

 

Hello.

I don't have installed the Delphi XE4, but I think that the following code should be OK.

package UniGMapDXE4;

{$R *.res}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO ON}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS ON}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION ON}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
{$REFERENCEINFO ON}
{$SAFEDIVIDE OFF}
{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
{$IMPLICITBUILD ON}

requires
  rtl,
  vcl,
  vclimg,
  dbrtl,
  vcldb,
  uniGUI18,
  uIndy18,
  uniTools18;

contains
  UniGMap in 'UniGMap.pas';

end.

Link to comment
Share on other sites

 

Hello.

I don't have installed the Delphi XE4, but I think that the following code should be OK.

package UniGMapDXE4;

{$R *.res}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO ON}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS ON}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION ON}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
{$REFERENCEINFO ON}
{$SAFEDIVIDE OFF}
{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
{$IMPLICITBUILD ON}

requires
  rtl,
  vcl,
  vclimg,
  dbrtl,
  vcldb,
  uniGUI18,
  uIndy18,
  uniTools18;

contains
  UniGMap in 'UniGMap.pas';

end.

 

 

Error :(((

post-755-0-92793500-1440703027_thumb.png

Link to comment
Share on other sites

  • 6 months later...

Hi

 

Yes I did. In fact now doing some more tests only on Google Chrome and Safari the map doesn't show, in other browsers it works fine.

 

Have you ever seen it?

 

 Hi,

 

 In version 099.90.1273 it is ok in Chrome. I still did not download the latest release. I'll do the test when updating and will post the result. 

 

 Best Regards,

Link to comment
Share on other sites

  • 2 weeks later...

Hi.

 

I'm trying to use unigmap.

 

allways get the same error: google is not defined.

 

all the samples works ok, but when I try to do a map myself, allways the same error.

 

some help please. showing maps in my apps is very important for me.

 

thanks in advance.

Link to comment
Share on other sites

Hi.

 

I'm trying to use unigmap.

 

allways get the same error: google is not defined.

 

all the samples works ok, but when I try to do a map myself, allways the same error.

 

some help please. showing maps in my apps is very important for me.

 

thanks in advance.

can you attach your project so we can see what is going on

Link to comment
Share on other sites

Hi.

 

I'm trying to use unigmap.

 

allways get the same error: google is not defined.

 

all the samples works ok, but when I try to do a map myself, allways the same error.

 

some help please. showing maps in my apps is very important for me.

 

thanks in advance.

 

Hello.

try to place a gmap component on your Main Form.

(you can set it invisible)

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