Jump to content


Photo

Google Map New Component


  • Please log in to reply
54 replies to this topic

#21 patmap

patmap

    Advanced Member

  • Members
  • PipPipPipPip
  • 265 posts
  • LocationTehran, Iran

Posted 28 July 2011 - 08:37 AM

Hi Patman Test new Version 1.3.3
firefox & Google Chrome have log error
see picture
Thank


Hi

You must be use Last version of uniGUI ver 0.86.0.887

Best Regards


  • 0

#22 khachornsak

khachornsak

    Member

  • Members
  • PipPip
  • 22 posts

Posted 28 July 2011 - 05:56 PM

Hi Patman

It works now. Have additional questions, I will change the Icon was also on display.



Thank U.
  • 0

#23 khachornsak

khachornsak

    Member

  • Members
  • PipPip
  • 22 posts

Posted 29 July 2011 - 06:52 PM

Icon Marks not change

UniGoogleMap1.AddMarker('0', '1', '35.737177', '51.405587', 'Marker 1','','','car.png') ;
Icon not change to car.png (Param iconname);
Help me please .
  • 0

#24 patmap

patmap

    Advanced Member

  • Members
  • PipPipPipPip
  • 265 posts
  • LocationTehran, Iran

Posted 30 July 2011 - 06:00 AM

Hi khachornsak

Use with file path:

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


Best Regards
  • 0

#25 FredyCC

FredyCC

    Active Member

  • Members
  • PipPipPip
  • 55 posts
  • LocationMéxico

Posted 31 July 2011 - 01:38 AM

Thanks patmap, very usefull component. :)

Regards.
  • 0

#26 khachornsak

khachornsak

    Member

  • Members
  • PipPip
  • 22 posts

Posted 31 July 2011 - 02:53 AM

Hi khachornsak

Use with file path:

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


Best Regards


Thank Patman

Regards.
  • 0

#27 lema

lema

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 350 posts

Posted 23 September 2011 - 06:21 PM

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.

Attached Files


  • 0

#28 patmap

patmap

    Advanced Member

  • Members
  • PipPipPipPip
  • 265 posts
  • LocationTehran, Iran

Posted 25 September 2011 - 11:39 AM

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

#29 lema

lema

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 350 posts

Posted 25 September 2011 - 06:59 PM

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

#30 patmap

patmap

    Advanced Member

  • Members
  • PipPipPipPip
  • 265 posts
  • LocationTehran, Iran

Posted 25 September 2011 - 07:56 PM

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

#31 patmap

patmap

    Advanced Member

  • Members
  • PipPipPipPip
  • 265 posts
  • LocationTehran, Iran

Posted 25 September 2011 - 08:03 PM

Hi,

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

New Version: 1.3.5

Thank from lema

Best Regards
  • 0

#32 lema

lema

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 350 posts

Posted 26 September 2011 - 04:39 AM

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

#33 lema

lema

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 350 posts

Posted 12 October 2011 - 06:42 AM

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

#34 khachornsak

khachornsak

    Member

  • Members
  • PipPip
  • 22 posts

Posted 21 October 2011 - 06:03 PM

Hi Patman
Please fix Google Map for Delphi XE2 and Unigui 0.87.0.896

I Can't install component this version


Thank U.
  • 0

#35 patmap

patmap

    Advanced Member

  • Members
  • PipPipPipPip
  • 265 posts
  • LocationTehran, Iran

Posted 23 October 2011 - 08:29 PM

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

#36 khachornsak

khachornsak

    Member

  • Members
  • PipPip
  • 22 posts

Posted 25 October 2011 - 03:05 AM

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

#37 lema

lema

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 350 posts

Posted 25 October 2011 - 04:48 AM

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

#38 FredyCC

FredyCC

    Active Member

  • Members
  • PipPipPip
  • 55 posts
  • LocationMéxico

Posted 03 December 2011 - 05:30 AM

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

#39 Marko Kastelic

Marko Kastelic

    Member

  • Members
  • PipPip
  • 37 posts

Posted 06 December 2011 - 09:15 AM

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

#40 patmap

patmap

    Advanced Member

  • Members
  • PipPipPipPip
  • 265 posts
  • LocationTehran, Iran

Posted 06 December 2011 - 10:00 PM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users