Jump to content
uniGUI Discussion Forums
Sign in to follow this  
patmap

Google Map New Component

Recommended Posts

Hi khachornsak

 

Use with file path:

 

  
UniGoogleMap1.AddMarker('0', '1', '35.737177', '51.405587', 'Marker 1','','','files/car.png') ;

 

 

Best Regards

 

Thank Patman

 

Regards.

Share this post


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

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

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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites

Hi,

 

I fixed localized DecimalSeparator to '.' and repost in Post #1

 

New Version: 1.3.5

 

Thank from lema

 

Best Regards

Share this post


Link to post
Share on other sites

Hi,

 

I fixed localized DecimalSeparator to '.' and repost in Post #1

 

New Version: 1.3.5

 

Thank from lema

 

Best Regards

 

Great !

It is working fine now.

Thank you again.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Hi Patman

Please fix Google Map for Delphi XE2 and Unigui 0.87.0.896

 

I Can't install component this version

 

 

Thank U.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Hi Patman

 

I Used Unigui 0.87.0.90 and Google Map V1.4.1

when close form google map . Error ajax OEA is not define

see.picture

Share this post


Link to post
Share on other sites

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

 

Thank you patmap.

Share this post


Link to post
Share on other sites

Very usefull component, thanks patmap.

 

Only one question there is a way to retrive latitude and longitude after move any marker on the map?

 

Regards.

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Remove uniGUIVars from Uses list.

 

[DCC Error] UniGoogleMap.pas(230): E2003 Undeclared identifier: 'UniGUIServerInstance'

Share this post


Link to post
Share on other sites

Thanks patmap.

 

for compling (Delphi XE2):

 

change UniGUIServerInstance -> UniServerInstance

 

for running (Delphi XE2):

 

change ServerModule ->ExtRoot -> [ext]\

 

add path Tools->Library->Library Path

Share this post


Link to post
Share on other sites
Sign in to follow this  

×