Jump to content

lema

uniGUI Subscriber
  • Posts

    405
  • Joined

  • Last visited

  • Days Won

    21

Posts posted by lema

  1. Hi Lema,

     

    I just created a fresh test project (see attachment) and now it's working. I got the error in a existing big project where i added the GMap

    functionality....so i have to see what's differenbce between the test project and the existing project.

     

    BUT...if have 1 question...is it possible to ad a marker / infowindow based on the given address or do you have to 

    reverseGeocoding first before to adding a marker / infowindows

     

    Regards PEter

     

    Hello.

    At first, make sure that you have copied the js libraries under the directory /files

    (see the demo structure)

     

    Second, you will need an entry pointing to google api in your servermodule.CustomFiles.

    (http://maps.googleapis.com/maps/api/js?........)

    You can drop a gmap component on your main form and it will do the job for you.

    (You can set its visibility to false)

     

     

    And yes, you have to call at first the geocode procedure in order to get Latitude and Longitude and then use them in AddMarker.

  2.  

    Hi Lema,

     

    THanks...that's the correct file. I just want to use some geocoding and looked at the example...but missing something? 

     

    • So i created a form which contains the UniGmap.
    • The OnShow events contains : UniGmap.Initialize;
    • Put a editbox on the form for entering the addres and a button to do the search with this code :   UniGMap1.Geocoding(UniEdit_Address.Text)

      I got this Ajax error

    _rsov_(O4BF,22);var geocoder = new google.maps.Geocoder(); geocoder.geocode({"address": "standaardmolen 86 weert"}, function(results, status) {   if (status == google.maps.GeocoderStatus.OK) {     ajaxRequest(O50B, "Geocoder", ["lat="+results[0].geometry.location.lat(), "lng="+results[0].geometry.location.lng() ]);     } else {     ajaxRequest(O50B, "Geocoder", ["Geocoder failed due to: " + status]);     }   } );

     

    Hi Peter.

    Can you provide a test app?

  3. In Delphi 2010 that I was using for several years , I had no problem changing the target through the directive UNIGUI_VCL.

    The name in project manager was changing accordingly (Project.exe / Project.dll) , I had not even the need of closing and re-opening the whole project.

     

    Now, I evaluate the Seattle and the method of changing (commenting out) the compiler directive in project source doesn't seem to work for the project name showing in IDE - Project manager, even with closing and re-opening project and/or Delphi itself.

     

    For example , you see in the IDE that the target is the Project.dll , but the directive UNIGUI_VCL is active and the linker will link the project into the Project.exe. This will drive into misunderstandings.

     

     

    The workaround I use is the following .

     

    I create new configurations xxx_exe and xxx_dll

    post-281-0-79423900-1463255516_thumb.png

     

    I remove the {$define UNIGUI_VCL} from project source.

     

    In xxx_exe configurations, I add the UNIGUI_VCL in conditional defines and exe as Target file extension

    In xxx_dll configurations, I just change the Target file extension to dll

     

    post-281-0-49143200-1463256436_thumb.png

    post-281-0-38978600-1463256445_thumb.png

     

     

    Please correct me if there is any easier way to jump from library to program linking.

     

     

  4. I agree.

    I have see the advantages of uniGUI over the 4-5 years of using the framework.

     

    My need for now is a very good presentation of uniGUI to the boss.

    I have to give my quotation and a project plan (and a small demo , I have already built).

    The whole plan must be competitive against web frameworks.

     

    So , if you have some points that I can focus, please post.

  5. Hello,

    I am trying uniGUI under Delphi Seattle and every time , after creating a new project through Application Wizard (or mobile) I get the following message.

     

     

    Unit "ServerModule.pas" references the "Visual Component Library" framework, but the project currently has no framework assigned. Do you want to enable the "Visual Component Library" framework for this project?

    (Not enabling the proper framework may require unit scoping, ambiguities, and linkage to framework binaries to be handled manually)

     

    Is it normal ?

    I am new to modern Delphi versions, so excuse me about the silly question.

     

     

    Win 10 Home

    Delphi Seattle

    uniGUI v0.99.95.1298

     

    post-281-0-96813500-1462654615_thumb.png

     

     

  6. Put a market on the map, using unigui phone

    Hello, Mr. Lema, as I can place a marker , the geolocalizacion found .?

    Tks 

     

    Hello, I am not sure that I understood your question.

     

    If you want to place a marker after the geolocation.getCurrentPosition call,

    you can see the demo's GeolocationAPIFM unit.

  7. Does your device share its location ?

    Can you check it with another browser ?

     

    I tested successfuly on iphone and Samsung mobile with Android 4.1.2

     

     

    Also change the UnimButton1Click :

    procedure TMainmForm.UnimButton1Click(Sender: TObject);
    begin
      UniSession.AddJS(
        'if (navigator.geolocation) { ' +
        '  navigator.geolocation.getCurrentPosition( function(position) { ' +
        '    ajaxRequest(MainmForm.UnimButton1, "CurrentPosition" ,' +
        '      ["lat=" + position.coords.latitude, ' +
        '       "lng=" + position.coords.longitude, ' +
        '       "acc=" + position.coords.accuracy, ' +
        '       "alt=" + position.coords.altitude, ' +
        '       "altacc=" + position.coords.altitudeAccuracy, ' +
        '       "head=" + position.coords.heading, ' +
        '       "ts=" + position.coords.timestamp ' +
        '      ]);' +
        '    })' +
        '} else {alert("Geolocation is not supported.");}');
    end;
    
  8. I want to retrieve latitude and longitude from geolocation !

    Hello experts,

    I want to know, how would I retrieve Latitude and Longitude from geolocation.

    I want to send that via JSON param to my server for storing in my SQL database.

    Is it possible to get it as string? using unigui movile 

     

     

    Hello,

    I am getting lat & lng with a simple geolocation.getCurrentPosition()

    mgeolocation.zip

  9. Hi ,

    The company I work with is about to begin a new web project.
    The task is oriented towards CRM and must have web and mobile editions.

    There are some suggestions from web developers for frameworks that we can use.

    Unfortunately, as an old fashioned programmer, I know little about web frameworks and as a result I can't compare them to unigui.

    I would like your help concerning the suggestion I will need to make for unigui.

     

    What are the strong points that I can put forth?

    For example,
    Development time
    Security during deployment (code can't be stolen)
     

  10. after initializemap, must I wait any amount of time to create markers and / or polygons?

     

    if I do  UniGMap1.InitializeMap; and inmediately add markers, the app. raise an error.

     

    I have a button to create a mark after show a map, but I can't do it at once.

     

    I dont' know what is the correcto order to make a map with marks. In  the samples, all the marks ar created with a button click, not in the formshow.

     

    some help please.

     

    thanks.

     

     

    Web application works asynchronous.

     

    As workaround you can use a timer with 100-200ms interval.

     

    procedure TForm1.FormShow(Sender: TObject);
    begin
      UniGMap1.InitializeMap;
      UniTimer1.Enabled := True;
    end;
    
    procedure TForm1.UniTimer1Timer(Sender: TObject);
    begin
      UniTimer1.Enabled := False;
      //Create Markers
    end;
    
  11. Hi.

     

    I'm trying to use unigmap.

     

    allways get the same error: google is not defined.

     

    all the samples works ok, but when I try to do a map myself, allways the same error.

     

    some help please. showing maps in my apps is very important for me.

     

    thanks in advance.

     

    Hello.

    try to place a gmap component on your Main Form.

    (you can set it invisible)

  12.  

     

    Wow.

    Currently , I am using the tdxmemdata in multi-threading environments (not only unigui) without problems.

    I thought, It was thread-safe !

     

    Now I feel uncomfortable too...

  13. Hi. Please dpk for Delphi XE4, the one that is attached to the cap threads is not installed :(

    Thanks!!!

     

    Hello.

    I don't have installed the Delphi XE4, but I think that the following code should be OK.

    package UniGMapDXE4;
    
    {$R *.res}
    {$ALIGN 8}
    {$ASSERTIONS ON}
    {$BOOLEVAL OFF}
    {$DEBUGINFO ON}
    {$EXTENDEDSYNTAX ON}
    {$IMPORTEDDATA ON}
    {$IOCHECKS ON}
    {$LOCALSYMBOLS ON}
    {$LONGSTRINGS ON}
    {$OPENSTRINGS ON}
    {$OPTIMIZATION ON}
    {$OVERFLOWCHECKS OFF}
    {$RANGECHECKS OFF}
    {$REFERENCEINFO ON}
    {$SAFEDIVIDE OFF}
    {$STACKFRAMES OFF}
    {$TYPEDADDRESS OFF}
    {$VARSTRINGCHECKS ON}
    {$WRITEABLECONST OFF}
    {$MINENUMSIZE 1}
    {$IMAGEBASE $400000}
    {$IMPLICITBUILD ON}
    
    requires
      rtl,
      vcl,
      vclimg,
      dbrtl,
      vcldb,
      uniGUI18,
      uIndy18,
      uniTools18;
    
    contains
      UniGMap in 'UniGMap.pas';
    
    end.
    
    
  14. Hello lema.

     

    I've seen your examples and they're pretty nice. I'm using the feature "Route" to trace a route between 2 coordinates. So far it's ok, but I need to get the polylines among the route to compute a more accurate distance between my origin and destination. Is it possible to do it?

     

    Thank you.

     

     

    Renato

     

    Hello Renato.

     

    I don't think that we can have more accurate computation of distance than Google.

     

    But , if you want the full point list of each step , see the the UniDBGrid1CellClick procedure of DirectionsForm in demo project.

    If you iterate through these points you can calculate the progressive distance.

     

    You will also need the functions TUniGMap.DecodeLatLngPath and TUniGMap.ComputeDistanceBetween.

  15. Hi Iema

    I have just installed the latest version of unigui to date and then re-installed the unigmap component.  I am getting the message below.

     

    [dcc32 Fatal Error] Main.pas(9): F2051 Unit UniGMap was compiled with a different version of uniGUIApplication.UniSession

     

    Could you possibly tell me where I am going wrong,  sure there is a simple solution.

     

    All the best

     

    Russell

     

    Hello Russell.

     

    As Alberto said in previous post, you have to rebuild the unigmap package.

    Also, make sure that you have completely uninstall any previous version (remove bpl / dcu files) before rebuilding.

  16. Hi

    Wonder if you can help me.  I cannot get the mapclick event to fire in my own test project.

     

    I have a form, 2 edit boxes and unigmap component, nothing too complicated.

     

    procedure TMapForm.UniGMap1AjaxEvent(Sender: TComponent; EventName: string;

      Params: TStrings);

    var

      lat, lng: string;

    begin

     

      if (EventName = 'mapclick')  then

      begin

        lat := StringReplace(Params.Values['lat'], '.', ',', [rfReplaceAll]);

        lng := StringReplace(Params.Values['lng'], '.', ',', [rfReplaceAll]);

     

       latdec.Text := lat;

       londec.Text := lng;

      end; // mapclick

     

    end;

     

    Russell

     

    Hello ,

    Could you please attach a demo project to help me reproduce this issue?

  17.  

    Hi.

     

    Before I test your suggestion I did the following:

    I added a unitimer with "RunOnce" as true to execute 1 second after the form is loaded.

    It worked, but it's a quick fix.

    I'm adding an example as you asked.

     

    Thanks.

     

    Renato

     

    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.

    • Upvote 1
×
×
  • Create New...