Jump to content

andyhill

uniGUI Subscriber
  • Posts

    1258
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by andyhill

  1. Because I did not want labels associated with the Icon Marker I have used the zIndex as a tag for selective deleting.
  2. Perfect - thank you. I am using title to distinguish markers however I do not want labels painted. How would you tag markers so as to know one from another without using title ?
  3. Perhaps I miss understood you. procedure TGPSmForm.UnimFormCreate(Sender: TObject); begin UniSession.AddJS('var uniVars.markers = [];'); end; procedure TGPSmForm.UnimHTMLFrame1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); ... UniSession.AddJS('var gm = googleMap; '+ 'if (typeof gm == "object") '+ '{ '+ ' for (var i = 0; i < uniVars.markers.length; i++) '+ ' { '+ ' uniVars.markers.setMap(null); '+ ' } '+ ' var myLatLng = {lat: '+LatStr+', lng: '+LngStr+'}; '+ ' var imageman = ''man.png'';'+ ' var manmarker = new google.maps.Marker '+ ' ( '+ ' { '+ ' position: myLatLng, '+ ' map: gm, '+ ' icon: imageman '+ ' } '+ ' ); '+ ' uniVars.markers.push(manmarker); '+ ' gm.resizeWindow; '+ '} ' ); Would you please show in code - thanks.
  4. I use several google map markers on initial map presentation and all paint correctly. After initializing with the default markers, the user can then request a marker's position to be updated. Therefore before any marker updates can take place I want to verify if there are previous markers already on the map, if so then I need to remove the old marker in order to paint the markers new position. In my code below the alert(''new''); always fires telling me that markers is not global - how can I accomplish this - thanks in advance. // Set Global Variable procedure TGPSmForm.UnimFormCreate(Sender: TObject); begin UniSession.AddJS('var markers = [];'); end; ... UniSession.AddJS( 'if (markers == null) '+ '{ '+ ' var markers = []; '+ ' alert(''new''); '+ '} '+ 'var gm = googleMap; '+ 'if (typeof gm == "object") '+ '{ '+ ' for (var i = 0; i < markers.length; i++) '+ ' { '+ ' markers.setMap(null); '+ ' alert(''for loop''); '+ ' } '+ ... ' markers.push(manmarker); '+
  5. Thanks, however I am not using a font. I want to use an image from a URL. Below is code from Sencha but it fails to show the URL image (and yes, the image is there, and can be seen by direct browser access), can you please advise - thanks. CustomCSS.Add('.x-tab .x-button-icon.car::before, .x-button .x-button-icon.car::before '); CustomCSS.Add('{ '); CustomCSS.Add(' padding: 5px !important; '); CustomCSS.Add(' width: 40px; '); CustomCSS.Add(' height: 40px; '); CustomCSS.Add(' -webkit-mask-image: url(''car.png'') !important; '); CustomCSS.Add(' -webkit-mask-size: 30px 30px; '); CustomCSS.Add(' -webkit-mask-repeat: no-repeat; '); CustomCSS.Add(' -webkit-mask-origin: content; '); CustomCSS.Add(' background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, '); CustomCSS.Add(' from(rgba(255, 255, 255, 0.7)), to(rgba(255, 255, 255, 0.9))) !important; '); CustomCSS.Add(' background-color: #000000 !important; '); CustomCSS.Add('} ');
  6. The Sencha Themed TitleButton (gear image), I want to change the gear image to an image of my own from a URL.
  7. I have a mobile form with IconCls themed button image, how can I replace the image/icon on the themed button using a URL ?
  8. We are getting all sorts of server errors causing server shutdown with these file requests (real path substituted with xxx, IP substituted with iii.iii.iii.iii and nnn.nnn.nnn.nnn):- WebApp.exe: 00002718: 17:54:21 [HandleFileRequest[iii.iii.iii.iii]]:File not found: xxx\static\UI_win7\js\login.js IS THIS A HACK ATTEMPT ? WebApp.exe: 00001448: 14:58:54 [HandleFileRequest[nnn.nnn.nnn.nnn]]:File not found: xxx\apple-touch-icon-152x152-precomposed.png THESE NEXT THREE FILES DO NOT EXIST ? WebApp.exe: 00001EA4: 14:58:54 [HandleFileRequest[nnn.nnn.nnn.nnn]]:File not found: xxx\apple-touch-icon-152x152.png WebApp.exe: 0000122C: 14:58:54 [HandleFileRequest[nnn.nnn.nnn.nnn]]:File not found: xxx\apple-touch-icon.png In all four cases above the Server should not be taken out ? Please advise how to keep server up and running - thanks.
  9. I have 100 people simultaneously connected with a session timeout each of 3 hrs to my app that contains 10 forms and each form contains an average 10 objects per form. The server kept maxing out. I have since adjusted the following parameters:- MaxConnection = 1,000 MaxGDIObjects = 10,000 (100 x 10 x 10) MaxRequests = 1,000 MaxSessions = 1,000 ThreadPoolSize = 1000 Please advise your recommendations - Thanks
  10. I place multiple circles over a course of time on a Google Map (using various events). Within a new event, how can I remove the LAST circle drawn and at the same time preserve all of the other circles ? Any help would be appreciated - thanks. // Draw Circle UniSession.AddJS('var gm = googleMap; '+ 'if (typeof gm == "object") '+ '{ '+ ' var myLatLng = {lat: '+LatStr+', lng: '+LngStr+'}; '+ ' var circle = new google.maps.Circle '+ ' ( '+ ' { '+ ' strokeColor: ''#0000FF'', '+ ' strokeOpacity: 0.8, '+ ' strokeWeight: 2, '+ ' fillColor: ''#FF0000'', '+ ' fillOpacity: 1.00, '+ ' map: gm, '+ ' center: myLatLng, '+ ' radius: 10 '+ ' } '+ ' ); '+ '} ' );
  11. I have come up with a work around for my environment. As general information I have included my redirect research below. JavaScript Redirect Methods ////////////////////////////////////////////////////////////////////////// // Sets the new location of the current window. window.location = "https://www.example.com"; // Sets the new href (URL) for the current window. window.location.href = "https://www.example.com"; // Assigns a new URL to the current window. window.location.assign("https://www.example.com"); // Replaces the location of the current window with the new one. window.location.replace("https://www.example.com"); // Sets the location of the current window itself. self.location = "https://www.example.com"; // Sets the location of the topmost window of the current window. top.location = "https://www.example.com"; Though the above lines of JS code accomplish a similar job in terms of redirection, they have slight differences in their usage. For example, if you use top.location redirect within an iframe, it will force the main window to be redirected. Another point to keep in mind is that location.replace() replaces the current document by moving it from the history, hence making it unavailable via the Back button of the browser. It is better to know your alternatives but if you want a cross-browser compliant JavaScript redirect script, our recommendation will be to use the following in your projects: window.location.href = "https://www.example.com";
  12. Thank you pedrisco. My WebApp runs on a local LAN which is accessible publicly via Port Forwarding on the Router Gateway. We route 80 and 443 which all works perfectly. My WebApp knows when we are not in Secure Mode. So, I need to get the browser to approach the URL with "https" port in order to route correctly. I need to be able to re-direct the browser if not in secure mode. if UniSession.SSL = False then begin UniSession.AddJS('window.location.href = ''https:'' + window.location.href.slice(5); '); end; I have this code in the MainModule Create as well as the first Form shown create. The UniSession.AddJS is sent but no browser change takes place. Please advise - thanks.
  13. Farshad, I really need a fix for this ASAP. Please test mPDFFrame component on iPhone (it intermittently crashes on iPhoneX, iPhone7 etc. irrespective of PDF image) when one zooms in/out and pans around.
  14. Please advise how I can set Mobile TUnimEdit.FieldLabel.Font Colours please - thanks.
  15. Further testing on iPhone appears to show that the PDFFrame object has trouble staying within (linked to) the ParentForm or optionally the ParentContainer of the ParentForm ? Is there some sort of java script required to tell the frame who the parent form is ? There is no apparent issue on Desktop.
  16. How and where do I implement this within the Delphi code:- procedure TUniMainModule.UniGUIMainModuleCreate(Sender: TObject); begin if UniSession.SSL = False then begin UniSession.AddJS('window.location.href = ''https:'' + window.location.href.slice(5); '); or procedure TLoginmForm.UniLoginmFormCreate(Sender: TObject); begin if UniSession.SSL = False then begin UniSession.AddJS('window.location.href = ''https:'' + window.location.href.slice(5); '); either way it has no effect ?
  17. I have no problems with SSL, all my SSL code works when the user types https://domainname.com What I want to do if the user types http://domainname.com then reroute them to https://domainname.com automatically.
  18. I want to make every user use our digital certificate (https), my code below has no effect - please advise - thanks. if UniSession.SSL = False then begin if DB.WantHTTPS = True then begin s:= UniSession.UrlReferer; s:= StringReplace(s, 'http', 'https', [rfReplaceAll]); UniSession.UrlRedirect(s); Close; end; end;
  19. Please show me how to implement :- // ' ajaxRequest(GPSmForm, ''_LatLong'', [myLatLng]); '+ or // ' ajaxRequest(GPSmForm.UnimHTMLFrame1, ''_LatLong'', [myLatLng]); '+ I need to get Lat/Lng when clicked (not as alert but as unigui event.
  20. The zoom failed, I tried many things before I asked you. As for the callback from Google Maps to my UniGUI Form I need help, please advise - thanks. ' google.maps.event.addListener '+ ' ( '+ ' gm, "dblclick", function(event) '+ ' { ' + ' var latitude = event.latLng.lat(); '+ ' var longitude = event.latLng.lng(); '+ ' ajaxRequest(GPSmForm, ''_LatLong'', ["lat=" latitude, "lng=" longitude]); '+
  21. Thank You. Now that I have all the info I need, how do I get it from Google (JS) back to UniGUI for storing ? I would have thought that I need some kind of GPSmForm Listener where JS passes the lat, lng and zoom variables. Would you kindly show me how to pass these variables - thanks.
  22. Fantastic. If I wanted the current zoom factor as well ? Once I have lat, lng and zoom then I need to collect this info in a unigui handler so I can store it in a table - any suggestions would be great.
  23. Farshad, I want to apologize for causing you any grief over this map issue. I have just found out Google was intermittently blocking my map requests demanding that I update my API Key (by throwing random errors) - now done - now working. If you could be so kind as to show me how to add a UniGUI Google Maps 'click' Listener and corresponding 'click' Handler so I can reverse geocode the Lat / Long where ever I click on the map - thanks
×
×
  • Create New...