du1000brazil
-
Posts
10 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by du1000brazil
-
-
Hello I made a change in the code to do with multiple lines. The problem is when we move 2 lines. Locate on the grid to stop working.
-
Hello,
can you please upload a working sample in order to look at it ?
thank you so much. But I've already figured it out.
-
Hello, I created this new procedure, so that there is no waypoint limit, google limits it by 25 points.
Only I can not remove after I have created. can you help me?? To remove all created routes. With the procedure "RemoveAllRoutes" deletes only the last route created ..
procedure TUniGMap.RouteUnlimitedWaypoints(DirectionsRequest: TDirectionsRequest);
var
Script: string;
tm: string; // travelmode
us: string; // unitSystem
begin
case DirectionsRequest.travelMode of
tmDRIVING: tm := 'DRIVING';
tmBICYCLING: tm := 'BICYCLING';
tmTRANSIT: tm := 'TRANSIT';
tmWALKING: tm := 'WALKING';
else
tm := 'DRIVING';
end;
case DirectionsRequest.unitSystem of
usMETRIC: us := 'METRIC';
usIMPERIAL: us := 'IMPERIAL';
else
us := 'METRIC';
end;
Script :=
'var service = new google.maps.DirectionsService; '+
'var stations = [@waypoints@];'+
'var lngs = stations.map(function(station) { return station.lng; });'+
'var lats = stations.map(function(station) { return station.lat; });'+
'@googleMap@.fitBounds({'+
'west: Math.min.apply(null, lngs),'+
'east: Math.max.apply(null, lngs),'+
'north: Math.min.apply(null, lats),'+
'south: Math.max.apply(null, lats),'+
'}); '+
' '+
'for (var i = 0, parts = [], max = 25 - 1; i < stations.length; i = i + max)'+
'parts.push(stations.slice(i, i + max + 1)); '+
''+
'var service_callback = function(response, status) {'+
'if (status != "OK") {'+
'console.log("Directions request failed due to " + status);'+
'return;'+
'}'+
'directionsDisplay = new google.maps.DirectionsRenderer;'+
'directionsDisplay.setMap(@googleMap@);'+
'directionsDisplay.setOptions({ draggable: @draggable@, suppressMarkers: @suppressMarkers@, preserveViewport: true });'+
'directionsDisplay.setDirections(response);'+
'};'+
''+
''+
''+
'for (var i = 0; i < parts.length; i++) {'+
' '+
' var waypoints = [];'+
'for (var j = 1; j < parts.length - 1; j++)'+
'waypoints.push({location: parts[j], stopover: false});'+
' '+
' var service_options = {'+
'origin : parts[0],'+
'destination : parts[parts.length - 1],'+
'travelMode : google.maps.DirectionsTravelMode.@travelMode@,'+
'unitSystem : google.maps.UnitSystem.@unitSystem@,'+
'waypoints : waypoints,'+
'avoidHighways : @avoidHighways@, '+
'provideRouteAlternatives : false, '+
'avoidTolls : @avoidTolls@'+
'};'+
''+
'service.route(service_options, service_callback); '+
' '+
'}';
// myTextReplace(Script, '@origin@', DirectionsRequest.origin);
// myTextReplace(Script, '@destination@', DirectionsRequest.destination);
myTextReplace(Script, '@waypoints@', DirectionsRequest.waypoints);
myTextReplace(Script, '@travelMode@', tm);
myTextReplace(Script, '@unitSystem@', us);
myTextReplace(Script, '@avoidHighways@', LowerCase(BoolToStr(DirectionsRequest.avoidHighways, true)));
myTextReplace(Script, '@avoidTolls@', LowerCase(BoolToStr(DirectionsRequest.avoidTolls, true)));
myTextReplace(Script, '@draggable@', LowerCase(BoolToStr(DirectionsRequest.draggable, true)));
myTextReplace(Script, '@suppressMarkers@', LowerCase(BoolToStr(DirectionsRequest.suppressMarkers, true)));
// myTextReplace(Script, '@EventHandler@', EventHandler);
ExecJScript(Script);
end; -
When the component is being created, it adds the necessary paths in ServerModule.CustomFiles.
So, there must be an instance of uniGmap on your FIRST form.
I always suggest to place an invisible uniGmap on your MainForm or LoginForm.
Thank you very much Motto, great work! I'll try.
-
When an application has a login form the component is not showing the map. If it does not have the form of login dai it works ..
-
This version also for Berlin?
This version also for Berlin?
link : https://mega.nz/#!pAdSgCLZ!Ubv0P03bs_qVwZJ11iiSqNKdX1ZcHvGDenjF1BD3y2I
-
Para rodar no delphi berlin .tem como ??
-
Hello
I wonder how I do it by inserting and deleting a temporary table and dynamically ... as drag and drop.
in the case using a firedac component TFDMemTable
UniDBGrid reordering rows using drag&drop
in General
Posted
Hello I made a change in the code to do with multiple lines. The problem is when we move 2 lines. Locate on the grid to stop working.
Unigui version:1.0.0.1425
Follow code in the link:
DragDropInSameGrid_teste.rar