Jump to content

Multiple Contacts in GMap with UniGui


cristianotestai

Recommended Posts

Hello,
 
Anyone know how to use the  Google Maps to do for example:
 
I have a contact list categorized by neighborhood or street and would like to display on the map all my contacts that are of particular street or neighborhood of a city.

 

What I need is to have a view on a map indicating the contacts, and hover at some point, show the contact name for example.
 
Someone already did something similar or have any idea perhaps using the UniGmap?
 
Thanks.
 
 

 

Link to comment
Share on other sites

Hello.

I am doing something similar using uniGMap and its markers' functionality.

 

http://forums.unigui.com/index.php?/topic/2363-google-maps-for-unigui/

 

 

 

e.g.

procedure TmyForm.UniButton1Click(Sender: TObject);
var
  aMarker: TMarker;
  i: integer;
begin

  for i := 1 to 50 do
  begin

    with aMarker do
    begin
      id := i;
      Latitude := random(150) - 75;
      Longitude := random(360) - 180;
      title := format('Marker %d', [i]);
      animation := maNone;
      clickable := True;
      draggable := False;
      raiseOnDrag := False;
      AddToCluster := True;
    end;

    UniGMap1.AddMarker(aMarker);
  end;

end;

  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...

 

Hello.

I am doing something similar using uniGMap and its markers' functionality.

 

http://forums.unigui.com/index.php?/topic/2363-google-maps-for-unigui/

 

 

 

e.g.

procedure TmyForm.UniButton1Click(Sender: TObject);
var
  aMarker: TMarker;
  i: integer;
begin

  for i := 1 to 50 do
  begin

    with aMarker do
    begin
      id := i;
      Latitude := random(150) - 75;
      Longitude := random(360) - 180;
      title := format('Marker %d', [i]);
      animation := maNone;
      clickable := True;
      draggable := False;
      raiseOnDrag := False;
      AddToCluster := True;
    end;

    UniGMap1.AddMarker(aMarker);
  end;

end;

 

Hi Lema,

 

To search the data and create the marks on the map, you store in the database the Latitude and Longitude information of each location, or at runtime, you search on Google API this information regarding the address to create the marks?

 

Regards,

 

Cristiano Testai

Brazil

Link to comment
Share on other sites

Hello Lema!
 
My table has the following fields, for example:
Name, Address, City, State or Province, Latitude, Longitude.
 
I have some questions about the best way to store the Latitude and Longitude:
 
1) At the moment of Insert, before storing in the database, I must make a call to the Google Maps API to get the Latitude and Longitude registry, to store in the table, right?
   So, how to handle, if the user only informed the Address without informing the city or state? Or if he only informed the City, without informing the address?
   I ask these questions because it is not necessarily required to inform the full address.
 
2) In each update of a record, I'll need to monitor if there was a change in one of the above fields to again call the API to get the latitude and longitude and update the registry.
   This is the best or only way to achieve?
 
Thanks for your comment.
 

 

Link to comment
Share on other sites

 

Hello Lema!
 
My table has the following fields, for example:
Name, Address, City, State or Province, Latitude, Longitude.
 
I have some questions about the best way to store the Latitude and Longitude:
 
1) At the moment of Insert, before storing in the database, I must make a call to the Google Maps API to get the Latitude and Longitude registry, to store in the table, right?
   So, how to handle, if the user only informed the Address without informing the city or state? Or if he only informed the City, without informing the address?
   I ask these questions because it is not necessarily required to inform the full address.
 
2) In each update of a record, I'll need to monitor if there was a change in one of the above fields to again call the API to get the latitude and longitude and update the registry.
   This is the best or only way to achieve?
 
Thanks for your comment.

 

 

Geocoding is not always accurate for partial addresses.

This is a problem without solution for all of us who trying to show POIs on a map.

I really don't have something to suggest except to ask from user to type a well-formed address like "Delphi, 330 54, Phocis, Greece"

Link to comment
Share on other sites

  • 3 weeks later...

  Hi Lema and All,

 

  Thanks for comment .. really, the user must enter a well-formed address.

 

  I have other situation:

 

  In the demo UniGMap component, is shown the use of Labels for Marks on Map where you can associate a CSS style or CSS class.
  It is possible to create a more elegant panel for the mark on the map as can be seen in the attached image?
 
  I need that when the user clicks on the mark, a panel with some information (similar to the example image) are presented as used by Google Maps.
 
  Could  you indicate if possible, how to perform the effect i need?
 
  Thanks!

post-17-0-24047000-1420551528_thumb.jpg

Link to comment
Share on other sites

Hi Lema!
 
I plan to have a clean panel with the name in bold, the address with normal font below and below a link to the contact page.
I believe that with CSS would be more elegant than create its own form just for this,  more i'm not sure how to accomplish this with UniGmap component.
 
In the image of the previous post, shows just how I like to have the information.

 

Thank you in advance.
 
Best Regards.

 

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