Jump to content

Google Maps for uniGUI


lema

Recommended Posts

Hello,

I uploaded a new version which include desktop and mobile versions.
 

I had no time to test it thoroughly, but I made some tests and it seems to working.

So , If you want, you can test it and post here your results.

 

 

2016-09-06  v1.4.2

--Added   Mobile version

 

 

post-281-0-54537700-1473148188_thumb.jpg

  • Upvote 2
Link to comment
Share on other sites

  • 2 weeks later...

Hi

What's required to install in XE8 ?

Many thanks

 

 

 

Hi,

save the following as UniGMapDXE8.dpk 

Open it with your XE8, compile and install.

package UniGMapDXE8;

{$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,
  uniGUI22,
  uIndy22,
  uniTools22;

contains
  UniGMap in 'UniGMap.pas';

end.

Link to comment
Share on other sites

  • 4 weeks later...

hi

how install  "GoogleMap.v1.4.2" in berlin ?

please help me....

 

 

Hello,

try to save the following as UniGMapBerlin.dpk 

Open it with your Berlin, compile and install.

package UniGMapBerlin;

{$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,
  uniGUI24,
  uIndy24,
  uniTools24;

contains
  UniGMap in 'UniGMap.pas';

end.

Link to comment
Share on other sites

  • 2 weeks later...

Hi Mr. Lema,

 

I am using this great component in my project. But i have a problem.

When i try running my project using localhost, map showing. But when i use mydomain.com, map not showing.

 

I've tried attaching API key i got as a parameter in my project. But i still can't get the map to show.

 

Is there something wrong with my project?

 

FYI, i'm using latest version of uniGMap, 1.4.2.

 

Thank you in advance.

Link to comment
Share on other sites

 

I've tried attaching API key i got as a parameter in my project. But i still can't get the map to show.

 

 

Hello,

set your own key at the corresponding constant (MyGoogleAPIKey) in the component and rebuild the package.

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 3 weeks later...

I'm trying to add a function to heatmap, but I can only put them and do not pull them. Anybody have any suggestions?

 

procedure TUniGMap.AddHeatMap(aHeatMap: array of THeatMap);
var
  i: Integer;
  lat, lng: string;
  Script: string;
begin
  Script :=
    'HeatMap = new google.maps.visualization.HeatmapLayer({' +
    'radius: ' + StringReplace(Format('%2.2f', [aHeatMap[0].Radius]), ',', '.', [rfReplaceAll]) + ',' +
    'data: getPoints(),' +
    'map: @googleMap@' +
    '});' +
    'function getPoints() {' +
    'return [';

    for i := 0 to Length(aHeatMap) -1 do
      if i <> Length(aHeatMap) -1 then
      begin
        lat := StringReplace(Format('%2.6f', [aHeatMap.Latitude]), ',', '.', [rfReplaceAll]);
        lng := StringReplace(Format('%2.6f', [aHeatMap.Longitude]), ',', '.', [rfReplaceAll]);

        Script := Script + 'new google.maps.LatLng(' + lat + ', ' + lng + '),'
      end
      else
      begin
        lat := StringReplace(Format('%2.6f', [aHeatMap.Latitude]), ',', '.', [rfReplaceAll]);
        lng := StringReplace(Format('%2.6f', [aHeatMap.Longitude]), ',', '.', [rfReplaceAll]);

        Script := Script + 'new google.maps.LatLng(' + lat + ', ' + lng + ')' +
        '];' +
        '}';
      end;

  ExecJScript(Script);
end;

 

procedure TUniGMap.RemoveHeatmap;
begin
    ExecJScript(
    'google.maps.event.clearInstanceListeners(HeatMap);' +
    'HeatMap.setMap(null);');
end;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...