mapper Posted December 30, 2014 Share Posted December 30, 2014 Great project. Thanks. Quote Link to comment Share on other sites More sharing options...
mapper Posted January 1, 2015 Share Posted January 1, 2015 Some times, The map corner come empty. Gmap frame aling is client.If i change zoom level, The map is to be diffrent dimention.Is it a bug? What can i do?Thank you Lema for help. Quote Link to comment Share on other sites More sharing options...
lema Posted January 3, 2015 Author Share Posted January 3, 2015 Some times, The map corner come empty. Gmap frame aling is client. If i change zoom level, The map is to be diffrent dimention. Is it a bug? What can i do? Thank you Lema for help. Adsız.jpg 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) Quote Link to comment Share on other sites More sharing options...
mapper Posted January 7, 2015 Share Posted January 7, 2015 Thank you Lema, Everythings is good. Now. Can we load PostGis or MySql Spatial Table with any query on the map? What do you think about? Quote Link to comment Share on other sites More sharing options...
cristianotestai Posted January 7, 2015 Share Posted January 7, 2015 Hi, My project with UniGMap is not firing the AjaxEvent. I create marks for the map, make a click on the mark and drag, and does not fire any Ajax Event. I checked the settings in the UniGmap Demo and there is nothing different, where the Demo events are fired. Any idea what could be? Delphi XE6 UniGui 0.97 Quote Link to comment Share on other sites More sharing options...
lema Posted January 7, 2015 Author Share Posted January 7, 2015 Hi, My project with UniGMap is not firing the AjaxEvent. I create marks for the map, make a click on the mark and drag, and does not fire any Ajax Event. I checked the settings in the UniGmap Demo and there is nothing different, where the Demo events are fired. Any idea what could be? Delphi XE6 UniGui 0.97 If you just left click on map , do you get the mapclick event ? Quote Link to comment Share on other sites More sharing options...
lema Posted January 7, 2015 Author Share Posted January 7, 2015 Thank you Lema, Everythings is good. Now. Can we load PostGis or MySql Spatial Table with any query on the map? What do you think about? 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 ? Quote Link to comment Share on other sites More sharing options...
cristianotestai Posted January 7, 2015 Share Posted January 7, 2015 If you just left click on map , do you get the mapclick event ? No, ajaxevent not fired. The js files are in \files directory, basic configuration are correct and work, but ajax event not fired. Quote Link to comment Share on other sites More sharing options...
lema Posted January 7, 2015 Author Share Posted January 7, 2015 No, ajaxevent not fired. The js files are in \files directory, basic configuration are correct and work, but ajax event not fired. Strange.. Try debugging using Firebug and look what events are coming. Quote Link to comment Share on other sites More sharing options...
mapper Posted January 8, 2015 Share Posted January 8, 2015 Hi Lema, ı want to add direct all geometric data from database. For example, like QGIS programs can read different data formats..(look at the pic.) Loading step by step is very slowly you know. Can gmap read *.shp, *.json, *.dxf ? Thanks for all. Quote Link to comment Share on other sites More sharing options...
lema Posted January 8, 2015 Author Share Posted January 8, 2015 Hi Lema, ı want to add direct all geometric data from database. For example, like QGIS programs can read different data formats..(look at the pic.) Loading step by step is very slowly you know. Can gmap read *.shp, *.json, *.dxf ? Thanks for all. Can you convert your shapefiles into KML ? The unigmap can load only KML files. Quote Link to comment Share on other sites More sharing options...
mapper Posted January 8, 2015 Share Posted January 8, 2015 Yes. But this is impotent all GIS programs. Thanks for rapidly answer. Quote Link to comment Share on other sites More sharing options...
cristianotestai Posted January 8, 2015 Share Posted January 8, 2015 Strange.. Try debugging using Firebug and look what events are coming. Hello Lema, I believe to have found the problem, which can be a possible bug. I debug and found that the ajax events are fired in the UniGMap MainForm component, not the component that is in the frame, which is the object that should respond to map events. It is probable that this possible bug occurs when using the Frames that are loaded in the main form, and for some reason, the events are captured by the object(UniGmap) of the main form of the application. Another thing, there is a way to report to the Title property of the mark to contain concatenated two words, one under the other? Ex: I tried Title: = varName1 + '<br>' + varName2 + '</br>'; but he gets everything as a single string. Thanks again! Quote Link to comment Share on other sites More sharing options...
lema Posted January 9, 2015 Author Share Posted January 9, 2015 Hello Lema, I believe to have found the problem, which can be a possible bug. I debug and found that the ajax events are fired in the UniGMap MainForm component, not the component that is in the frame, which is the object that should respond to map events. It is probable that this possible bug occurs when using the Frames that are loaded in the main form, and for some reason, the events are captured by the object(UniGmap) of the main form of the application. Yes , there is a bug. I will fix it asap ! Another thing, there is a way to report to the Title property of the mark to contain concatenated two words, one under the other? Ex: I tried Title: = varName1 + '<br>' + varName2 + '</br>'; but he gets everything as a single string. Thanks again! Try using TMarkerEx instead TMarker.TMarkerEx accepts HTML syntax and has more styling capabilities. Be careful ! TMarkerEx and MarkerWithLabel Library is not intended for heavy usage. Quote Link to comment Share on other sites More sharing options...
Stemon63 Posted January 9, 2015 Share Posted January 9, 2015 Hello Lema, wow!I have no tested your works, but demo is wonderful;Thanks.Stefano Quote Link to comment Share on other sites More sharing options...
cristianotestai Posted January 9, 2015 Share Posted January 9, 2015 Hello Lema, I believe to have found the problem, which can be a possible bug. I debug and found that the ajax events are fired in the UniGMap MainForm component, not the component that is in the frame, which is the object that should respond to map events. It is probable that this possible bug occurs when using the Frames that are loaded in the main form, and for some reason, the events are captured by the object(UniGmap) of the main form of the application. Yes , there is a bug. I will fix it asap ! Thanks! Another thing, there is a way to report to the Title property of the mark to contain concatenated two words, one under the other? Ex: I tried Title: = varName1 + '<br>' + varName2 + '</br>'; but he gets everything as a single string. Thanks again! Try using TMarkerEx instead TMarker.TMarkerEx accepts HTML syntax and has more styling capabilities. Be careful ! TMarkerEx and MarkerWithLabel Library is not intended for heavy usage. Ok! Something like add on map 50 /100 marks would be too much? Lema, There is another situation: I need to get the Left and Top of the mark in relation the Form/Frame Parent when the user clicks on the mark for me to display a UniPanel just below the mark with some information about the mark. I thought I'd add in markerExClick Listener two more variables that could return to the parameters in ajax event, something like: 'xpos =' + e.ClientX, '+ 'ypos =' + e.ClientY ' Could you add something like this for me to have the position of the mark in relation to its Parent component for above purpose? Thanks! Quote Link to comment Share on other sites More sharing options...
lema Posted January 9, 2015 Author Share Posted January 9, 2015 Lema, There is another situation: I need to get the Left and Top of the mark in relation the Form/Frame Parent when the user clicks on the mark for me to display a UniPanel just below the mark with some information about the mark. I thought I'd add in markerExClick Listener two more variables that could return to the parameters in ajax event, something like: 'xpos =' + e.ClientX, '+ 'ypos =' + e.ClientY ' Could you add something like this for me to have the position of the mark in relation to its Parent component for above purpose? Thanks! 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") Quote Link to comment Share on other sites More sharing options...
lema Posted January 9, 2015 Author Share Posted January 9, 2015 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 Quote Link to comment Share on other sites More sharing options...
Stemon63 Posted January 10, 2015 Share Posted January 10, 2015 Hi Lema, have you implemented getCurrentPosition or watchPosition in component? Thanks, Stefano Quote Link to comment Share on other sites More sharing options...
lema Posted January 11, 2015 Author Share Posted January 11, 2015 Hi Lema, have you implemented getCurrentPosition or watchPosition in component? Thanks, Stefano 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. Quote Link to comment Share on other sites More sharing options...
mapper Posted January 12, 2015 Share Posted January 12, 2015 Hi Lema, KML file loading is good working your demo. When i run it my pc with local kml file don't load. Can i load local kml file on lan? When i run with local kml , i will try run script other formats. ( Json, shp, dxf etc.) Thank you again. Good work. Quote Link to comment Share on other sites More sharing options...
lema Posted January 12, 2015 Author Share Posted January 12, 2015 Hi Lema, KML file loading is good working your demo. When i run it my pc with local kml file don't load. Can i load local kml file on lan? When i run with local kml , i will try run script other formats. ( Json, shp, dxf etc.) Thank you again. Good work. Hello , please see at http://forums.unigui.com/index.php?/topic/2363-google-maps-for-unigui/page-3&do=findComment&comment=11108 Quote Link to comment Share on other sites More sharing options...
Stemon63 Posted January 12, 2015 Share Posted January 12, 2015 Hi Lema, thank you. Quote Link to comment Share on other sites More sharing options...
cristianotestai Posted January 12, 2015 Share Posted January 12, 2015 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") Thanks Lema!! Great! Quote Link to comment Share on other sites More sharing options...
mapper Posted January 15, 2015 Share Posted January 15, 2015 Hi Lema, How we can Google Map InfoWindow Form design and add to object properties? If We can click object on the map, we can see its properties that we make any properties like JSON objects. Other side, if we can write spatial function how we can attach with the map. For example, i want to relation beetween map object and DBase. Thank you help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.