Jump to content


Photo

Google Maps for uniGUI


  • Please log in to reply
412 replies to this topic

#401 devya

devya

    Member

  • Members
  • PipPip
  • 11 posts

Posted 20 October 2017 - 07:58 AM

Dear All,

 

Can teach me how to use this component in UNIGUI, ?

 

1. retrieve the postal code from the address.

2. Calculate the distance between two address.

 

Thanks in advance.


  • 0

Regards,

 

Devy


#402 lema

lema

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 350 posts

Posted 20 October 2017 - 05:52 PM

Dear All,

 

Can teach me how to use this component in UNIGUI, ?

 

1. retrieve the postal code from the address.

2. Calculate the distance between two address.

 

Thanks in advance.

 

Hello,

 

1. You can try reverse geocoding.

 

2. Use the included Haversine formula

function TUniGMap.ComputeDistanceBetween(lat1, lng1, lat2, lng2: Double): Double;


  • 0

#403 devya

devya

    Member

  • Members
  • PipPip
  • 11 posts

Posted 21 October 2017 - 01:20 PM

Hello,

 

1. You can try reverse geocoding.

 

2. Use the included Haversine formula

function TUniGMap.ComputeDistanceBetween(lat1, lng1, lat2, lng2: Double): Double;

 

Hi Lema,

 

Thanks, i will try it.


  • 0

Regards,

 

Devy


#404 devya

devya

    Member

  • Members
  • PipPip
  • 11 posts

Posted 21 October 2017 - 01:50 PM

Hi Lema,

 

Thanks, i will try it.

Hi Lema,

 

Can i have the distance matrix function in your componnent ?

 

I need to draw the path from 1 Origin to multi destination from database.


  • 0

Regards,

 

Devy


#405 zemorango

zemorango

    Member

  • uniGUI Subscriber
  • PipPip
  • 30 posts
  • LocationPortugal

Posted 27 October 2017 - 10:49 AM

Hi Lema,

 

when I Compile my projects to 64 bits the UniGmap only shows a white screen. :unsure:

 it runs well on 32 bits but I really need to compile to 64 bits.

I'm using Delphi Berlin update 1 and unigui version


  • 0

#406 lema

lema

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 350 posts

Posted 27 October 2017 - 11:03 PM

Hi Lema,

 

when I Compile my projects to 64 bits the UniGmap only shows a white screen. :unsure:

 it runs well on 32 bits but I really need to compile to 64 bits.

I'm using Delphi Berlin update 1 and unigui version

 

Hello,

could you please upload a sample application demonstrating the problem ?


  • 0

#407 zemorango

zemorango

    Member

  • uniGUI Subscriber
  • PipPip
  • 30 posts
  • LocationPortugal

Posted 30 October 2017 - 01:00 PM

Hello,

could you please upload a sample application demonstrating the problem ?

 

Hi Lema, Yes I can, I send you a link, its a simple project

 

https://1drv.ms/u/s!...dsEppJqJX-HktXQ

 

also I have some problems running project as ISAP dll published to IIS, even in 32 bits I get a white screen instead of the map,

I tested you demo project and have the same problem

I sent you some pictures in the links below

 

https://1drv.ms/i/s!...b_Zo6gft6UK-CBA

 

https://1drv.ms/i/s!...c4_Dw7spMS3ze3g

 

 

 

 

 


  • 0

#408 lema

lema

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 350 posts

Posted 31 October 2017 - 05:14 AM

Hi Lema, Yes I can, I send you a link, its a simple project

 

https://1drv.ms/u/s!...dsEppJqJX-HktXQ

 

also I have some problems running project as ISAP dll published to IIS, even in 32 bits I get a white screen instead of the map,

I tested you demo project and have the same problem

I sent you some pictures in the links below

 

https://1drv.ms/i/s!...b_Zo6gft6UK-CBA

 

https://1drv.ms/i/s!...c4_Dw7spMS3ze3g

 

Hello, did you set your own Google API Key ?
(The corresponding constant is MyGoogleAPIKey)

You can get your key at https://code.google.com/apis/console/

 


  • 0

#409 tjpr87

tjpr87

    Newbie

  • Members
  • Pip
  • 4 posts
  • LocationPortugal

Posted 06 November 2017 - 05:59 PM

Hi Renato.

Now I see that you didn't include the required files

/../files/uniGmap.css
/../files/markerwithlabel_packed.js
/../files/markerclusterer_compiled.js
 

Please add them in the corresponding folder and try again.

Your anwser saved me :D

Thanks a lot.


  • 0

#410 deljavan

deljavan

    Member

  • uniGUI Subscriber
  • PipPip
  • 24 posts

Posted 12 November 2017 - 04:58 AM

Hi lema

I use unimgmap. Interestingly, The map is loaded and sometimes the map is not loaded
It does not know exactly why.
Where do I make a mistake?
please guide me ...
Thanks

Attached Files


  • 0

#411 birog

birog

    Newbie

  • uniGUI Subscriber
  • Pip
  • 2 posts

Posted 14 November 2017 - 05:53 PM

Great component.
Thank you so much

  • 0

#412 birog

birog

    Newbie

  • uniGUI Subscriber
  • Pip
  • 2 posts

Posted 14 November 2017 - 08:18 PM

Hi Lema,
 
after installing version 1.4.8 (with unigui Pro uni-1.0.0.1403), the route function displays an error and does not work.
The error also comes with uniGMap Demo (I've compiled on my PC)
If I open the DIRECTIONS example and click on GO, the application shows a script error with the "Unexpected string" message and the following text:
 
MarkerClusterer_OE4.clearMarkers();for ( var i=0; i<markersArray_OE4.length; i++ ) {google.maps.event.clearInstanceListeners(markersArray_OE4[i]);markersArray_OE4[i].setMap(null); } markersArray_OE4.length = 0;if (typeof directionsDisplay != "undefined") {  directionsDisplay.setMap(null);};var rendererOptions = {draggable: true};directionsDisplay = new google.maps.DirectionsRenderer(rendererOptions);var directionsService = new google.maps.DirectionsService();  var request = {   origin                   : "Brussel",   destination              : "Maastricht",   travelMode               : google.maps.DirectionsTravelMode.DRIVING,   unitSystem               : google.maps.UnitSystem.METRIC,   waypoints                : [],   avoidHighways            : false,   provideRouteAlternatives : false,   avoidTolls               : false};  directionsService.route(request, function(response, status){  if ( status == google.maps.DirectionsStatus.OK ) {    directionsDisplay.setDirections(response);    directionsDisplay.setMap(gm_OE4);  } else {alert(status);}});  google.maps.event.addListener(directionsDisplay, "directions_changed", function() {  var steps = [];  var wp    = [];  var my    = directionsDisplay.getDirections();   var data  = {};  data.copyrights     = my.routes[0].copyrights;  data.distancetext   = my.routes[0].legs[0].distance.text;  data.distancevalue  = my.routes[0].legs[0].distance.value;  data.durationtext   = my.routes[0].legs[0].duration.text;  data.durationvalue  = my.routes[0].legs[0].duration.value;  data.startaddress   = my.routes[0].legs[0].start_address;  data.endaddress     = my.routes[0].legs[0].end_address;  data.startlocation  = {"lat": my.routes[0].legs[0].start_location.lat(),"lng":my.routes[0].legs[0].start_location.lng()};  data.endlocation    = {"lat": my.routes[0].legs[0].end_location.lat(),"lng":my.routes[0].legs[0].end_location.lng()};  for ( var i=0; i < my.routes[0].legs[0].steps.length; i++) {    steps.push({      "enc_lat_lngs"   : my.routes[0].legs[0].steps[i].encoded_lat_lngs,      "instructions"   : my.routes[0].legs[0].steps[i].instructions,      "distancetext"   : my.routes[0].legs[0].steps[i].distance.text,      "distancevalue"  : my.routes[0].legs[0].steps[i].distance.value,      "durationtext"   : my.routes[0].legs[0].steps[i].duration.text,      "durationvalue"  : my.routes[0].legs[0].steps[i].duration.value,      "startlocation"  : {"lat": my.routes[0].legs[0].steps[i].start_location.lat(),"lng": my.routes[0].legs[0].steps[i].start_location.lng()},      "endlocation"    : {"lat": my.routes[0].legs[0].steps[i].end_location.lat(),"lng": my.routes[0].legs[0].steps[i].end_location.lng()}    });  }  data.steps = steps;  for ( var i=0; i < my.routes[0].legs[0].via_waypoints.length; i++) {      wp.push({"location" : my.routes[0].legs[0].via_waypoints[i].lat() + "," + my.routes[0].legs[0].via_waypoints[i].lng() });  }  data.waypoints = wp;  ajaxRequest(OE4, "directions_changed",     ["count=" + my.routes[0].legs[0].steps.length ,     "directionsDisplay=" + JSON.stringify(data)     "directionsRoutes=" + JSON.stringify(directionsDisplay.getDirections(), null, "\t")     ]); });
 
 
If I reinstall the version 1.4.6 everything will return to work perfectly.

 
Where am I wrong?
 
Thank you

 


  • 0

#413 bbm

bbm

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 78 posts
  • LocationGermany

Posted 22 November 2017 - 11:37 AM

Hi,

 

is the any way to get the lat and lng of a special address like zip+street+city?

 

best regards


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users