Jump to content

Google Map New Component


Recommended Posts

  • 1 month later...

Hi patmap.

Thank you for the UniGoogleMap component.

I succefully installed into D2010 and run the 3 demos.

No problem at all , except the functions DrawLine and DrawPolygon at DrawLine demo.

 

The DrawLine demo runs ,

I can see the map and I can add a marker. However , when try to execute the DrawLine or DrawPolygon function , I only get a blank map.

 

TIA,

Lema.

post-281-0-00408500-1316801959_thumb.png

post-281-0-51553000-1316802019_thumb.png

Link to comment
Share on other sites

Hi patmap.

Thank you for the UniGoogleMap component.

I succefully installed into D2010 and run the 3 demos.

No problem at all , except the functions DrawLine and DrawPolygon at DrawLine demo.

 

The DrawLine demo runs ,

I can see the map and I can add a marker. However , when try to execute the DrawLine or DrawPolygon function , I only get a blank map.

 

TIA,

Lema.

 

Hi,

 

I fixed it, and repost in Post #1

 

New Version: 1.3.4

 

Best Regards

Link to comment
Share on other sites

Hi,

The problem is in the conversion from Float to String.

You must take aware that in some countries (including mine) the DecimalSeparator is ','

so every FloatToStr results something like '35,737177' which is a wrong coordinate format.

 

 

I can solve it , writing something like that:

 

procedure TUniGoogleMap.PanTo(Lat, Lng: Double);
var
 ASaveSeparator: Char;
begin
 ASaveSeparator := DecimalSeparator;
 DecimalSeparator := '.';

 try
   if not (csDesigning in ComponentState) then
     UniSession.AddJS(MapName + '.panTo(' + FloatToStr(Lat) + ', ' + FloatToStr(Lng) + ');');
 finally
   DecimalSeparator := ASaveSeparator;
 end;
end;

 

 

Regards,

Lema.

Link to comment
Share on other sites

Hi,

The problem is in the conversion from Float to String.

You must take aware that in some countries (including mine) the DecimalSeparator is ','

so every FloatToStr results something like '35,737177' which is a wrong coordinate format.

 

 

I can solve it , writing something like that:

 

procedure TUniGoogleMap.PanTo(Lat, Lng: Double);
var
 ASaveSeparator: Char;
begin
 ASaveSeparator := DecimalSeparator;
 DecimalSeparator := '.';

 try
   if not (csDesigning in ComponentState) then
     UniSession.AddJS(MapName + '.panTo(' + FloatToStr(Lat) + ', ' + FloatToStr(Lng) + ');');
 finally
   DecimalSeparator := ASaveSeparator;
 end;
end;

 

 

Regards,

Lema.

 

 

Hi,

 

This is good idea, but not in multi thread application !!!

 

If you use multi thread application when you change DecimalSeparator value this effehct in all threads,

 

I change source with local ( Only this class ) change DecimalSeparator and will put here new source.

 

Best Regards

Link to comment
Share on other sites

  • 3 weeks later...

Hi patmap,

 

I have problem in using the function RemoveMarkers.

It doesn't seem to work for me.

I am using 0.86.0.889 and testing on your demo "OneMap".

 

 

Also , is there any way to clear Lines and polygons?

 

Regards,

Lefteris.

Link to comment
Share on other sites

  • 2 weeks later...

Hi patmap,

 

I have problem in using the function RemoveMarkers.

It doesn't seem to work for me.

I am using 0.86.0.889 and testing on your demo "OneMap".

 

 

Also , is there any way to clear Lines and polygons?

 

Regards,

Lefteris.

 

 

Hi Patman

Please fix Google Map for Delphi XE2 and Unigui 0.87.0.896

 

I Can't install component this version

 

 

Thank U.

 

 

Update Post #1

 

1.4.1 2011-10-23

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

* Update for uniGUI ver 0.87.0.901

* Add XE2 Project

* Fixed RemoveMarker

* Add ClearLine for Clear Lines and Polygons

Link to comment
Share on other sites

  • 1 month later...

Hi all,

 

I am testing UniGoogleMap component, and it is great.

But I have maybe stuppied question, how is possible to call other GMap functions.

 

does not work:

 

GoogleMap1.setZoom(8);

 

 

also does not work:

 

UniSession.AddJS('GoogleMap1.setZoom(10)')

 

What could be reason?

 

Thank's for help in advance,

 

Best regards,

Marko Kastelic

Link to comment
Share on other sites

Hi all,

 

I am testing UniGoogleMap component, and it is great.

But I have maybe stuppied question, how is possible to call other GMap functions.

 

does not work:

 

GoogleMap1.setZoom(8);

 

 

also does not work:

 

UniSession.AddJS('GoogleMap1.setZoom(10)')

 

What could be reason?

 

Thank's for help in advance,

 

Best regards,

Marko Kastelic

 

Hi,

 

Update to ver 1.4.2

Add SetZoom function

 

See DrawLine Sample.

 

Best Regards

Babak Yaghoobi

Link to comment
Share on other sites

Hi,

 

Update to ver 1.4.2

Add SetZoom function

 

See DrawLine Sample.

 

Best Regards

Babak Yaghoobi

 

Thank you very much patmap,

it works.

 

You made new function setZoom,

As I can see is also new GMap.js,

 

Is maybe possible to call some other Gmap function,

or must be every function defined inside of UniGoogleMap component?

 

Thank you again,

 

Best regards,

Marko Kastelic

Link to comment
Share on other sites

Thank you very much patmap,

it works.

 

You made new function setZoom,

As I can see is also new GMap.js,

 

Is maybe possible to call some other Gmap function,

or must be every function defined inside of UniGoogleMap component?

 

Thank you again,

 

Best regards,

Marko Kastelic

 

Hi,

 

I must be define any function in GMap.js and GoogleMap.pas component.

 

Best Regrads

Link to comment
Share on other sites

Hi,

 

I must be define any function in GMap.js and GoogleMap.pas component.

 

Best Regrads

 

Dear patmap,

 

Is it possible to use onAjaxEvent, so I vould like to get event,

when zoomchange happens?

 

How to do this with UniGoogleMaps component?

 

Thank you in advance,

 

br,mk.

Link to comment
Share on other sites

  • 2 months later...

can't install the component!?

use unigui 0.88.0 build 941

 

uses UniGUIVars

 

[DCC Warning] WSHUNIGUI.dpk(54): W1033 Unit 'UniGUIVars' implicitly imported into package 'UniGoogleMapDXE2'

[DCC Error] E2223 $DENYPACKAGEUNIT 'UniGUIVars' cannot be put into a package

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.

 Share

×
×
  • Create New...