Jump to content

du1000brazil

uniGUI Subscriber
  • Posts

    10
  • Joined

  • Last visited

du1000brazil's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. 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
  2. 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.
  3. thank you so much. But I've already figured it out.
  4. 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;
  5. Thank you very much Motto, great work! I'll try.
  6. 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 ..
  7. link : https://mega.nz/#!pAdSgCLZ!Ubv0P03bs_qVwZJ11iiSqNKdX1ZcHvGDenjF1BD3y2I
  8. Para rodar no delphi berlin .tem como ??
  9. 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
×
×
  • Create New...