Jump to content

lema

uniGUI Subscriber
  • Posts

    405
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by lema

  1. Hello , please see at http://forums.unigui.com/index.php?/topic/2363-google-maps-for-unigui/page-3&do=findComment&comment=11108
  2. Hello Stefano. You can easily implement getCurrentPosition. One way is the following: procedure TGeolocationAPIForm.UniButton2Click(Sender: TObject); begin UniSession.AddJS( 'if (navigator.geolocation) { ' + ' navigator.geolocation.getCurrentPosition( function(position) { ' + ' ajaxRequest(GeolocationAPIForm.UniButton2, "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 ' + ' ]);' + ' })' + '}'); end; and get the response : procedure TGeolocationAPIForm.UniButton2AjaxEvent(Sender: TComponent; EventName: string; Params: TStrings); begin if EventName = 'CurrentPosition' then begin // add a map marker or... end; end; I updated the unigmap demo and you can see it live at : http://79.143.178.31/lema/uniGMapDemo.dll I didn't try the geolocation.watchPosition , I suppose it works like getCurrentPosition.
  3. New version 2015-01-10 v1.3.9 -- Fixed Bug with Frames Tested with uniGUI 0.98.0.1126 Online demo: http://79.143.178.31/lema/uniGMapDemo.dll
  4. I added in the markerExClick Listener the variables xpos , ypos. (They are showing the marker X,Y point in map control instead of the mouse point). Another good approach is to use the ClientEvents to get mouse X,Y position. (You can see an example in uniGMapDemo , form "Map Options")
  5. Can you convert your shapefiles into KML ? The unigmap can load only KML files.
  6. Strange.. Try debugging using Firebug and look what events are coming.
  7. You can use your database to display objects on map (markers , polylines , etc). You can also use the map to get coordinates and store them to database. What exactly do you want to do ?
  8. If you just left click on map , do you get the mapclick event ?
  9. Hello ! You could use the marker click event to show a unigui form. Regarding CSS and HTML , I will take a look at it once I have access to my PC.
  10. Yes , I am aware of it. The use of UniGMap1.ResizeMap in UniFormResize event is not correct. You can use the following: procedure TMapForm.UniFormCreate(Sender: TObject); begin UniGMap1.ClientEvents.ExtEvents.Values['resize'] := 'function (sender, width, height, oldWidth, oldHeight, eOpts)' + '{ if (typeof gm_MapForm_UniGMap1 != ''undefined'') { ' + ' google.maps.event.trigger(gm_MapForm_UniGMap1, ''resize''); }}'; end; The code above will add a client event in UniGMap1 component. Thus, whenever the UniGMap1 resizes , the internal google maps objects resizes too. Please give your attention to the object naming (gm_MapForm_UniGMap1)
  11. http://forums.unigui.com/index.php?/topic/4888-dbgrid-is-editable-even-if-everything-is-set-as-readonly/?p=24738
  12. Did you assign or change unidbgrid.datasource in runtime ? I my case that was the problem.
  13. Yes, it is possible. Of course you need access to your DNS entries in order to add a new record.
  14. In order to see your VPS under a domain name and not with its IP address, you have 2 options. 1. Buy a domain name 2. Use your domain name and give a subdomain name to the VPS. Lets say that your VPS has the ip 1.2.3.4 and your main domain is mycompany.com Add an A record to your DNS zone with a subdomain name (e.g. webapps.mycompany.com.) and 1.2.3.4 as IP
  15. 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"
  16. Set at design time the UniGMap1.StaticHTML to True and try again. Also try to see the application with a different browser. If I remember correct, some older unigui versions had some issues with specific Chrome versions.
  17. Although the version you use is too old, please test the following sample project. test.ZIP
  18. Hello, I store in the database the Latitude and Longitude of each point.
  19. You can find MyGoogleAPIKey in UniGMap.pas What is your unigui version ?
  20. It seems OK from my side. Also check MyGoogleAPIKey in UniGMap. You can use your own key or use an empty string. What is your uniGUI version ?
  21. You can download the latest version of component and demo at http://forums.unigui.com/index.php?/topic/2363-google-maps-for-unigui/
  22. Maybe this could help you http://forums.unigui.com/index.php?/topic/2363-google-maps-for-unigui/ http://79.143.178.31/lema/uniGMapDemo.dll
  23. 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;
×
×
  • Create New...