Jump to content

Hayri ASLAN

Moderators
  • Posts

    1573
  • Joined

  • Last visited

  • Days Won

    133

Posts posted by Hayri ASLAN

  1. 2 hours ago, zanona said:

    I need to execute a java script code and get its return as soon as the exception ends. Is it possible to do this action?

    I can already execute the javascript using the code below, but I need to get its return as soon as it finishes executing.

       with JSInterface do WebForm of TUniForm
       begin
         JSCallGlobal('criaSessaoIdJson', ['']);
       end;

    You need to send an ajaxRequest to server in your custom function when your process done.

    for example

    ajaxRequest (sender, '_done', []);

     

    • Like 1
  2. Hi,

    Hyper server and persistent node zero.

     

    Persistent Node Zero

    Persistent Node Zero is a Node with Id = zero (0) and it is guaranteed to run continuously, i.e. it will never be permanently unloaded. However, it will be occasionally recycled like any other Node. Again, it is guaranteed that it will be reloaded immediately after it is recycled. Main purpose of a Persistent Node is to make sure that you have at least one Node running at a time. Consider a scenario where your uniGUI application should perform a background task in a thread, possibly in a TUniThreadTimer placed on a ServerModule. In a classical uniGUI app there is only one process, so your background task is guaranteed to run in form of a Singleton. However, in HyperServer  where multiple copies of same process are running concurrently, there should be a mechanism to ensure your Singleton method will run only in one of the Nodes. Persistent Node Zero option perfectly serves this purpose. All you need to do is enabled this option and checking Node Id in your uniGUI application. If boolean property in ServerModule named NodeZero is True, then it is safe to run your background task.

  3. 13 hours ago, M.Ammar said:

    Thank you for reply,

    - you are correct google maps are working it was error in the Key,

    - i was trying a deferent solution by adding the floor plan layer by importing a KML file,

    i had some success on making the example work on the Demos\Desktop\GoogleMaps project using the UniHTMLFrame, but i need this to be working on the unimap component because i need all the other functions available

    can you help me, here is the example:

    <!DOCTYPE html>
    <html>
      <head>
        <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
        <meta charset="utf-8">
        <title>KML Click Capture Sample</title>
        <style>
          html, body {
            height: 370px;
            padding: 0;
            margin: 0;
            }
          #map {
           height: 360px;
           width: 300px;
           overflow: hidden;
           float: left;
           border: thin solid #333;
           }
          #capture {
           height: 360px;
           width: 480px;
           overflow: hidden;
           float: left;
           background-color: #ECECFB;
           border: thin solid #333;
           border-left: none;
           }
        </style>
      </head>
      <body>
        <div id="map"></div>
        <div id="capture"></div>
        <script>
          var map;
          var src = 'https://developers.google.com/maps/documentation/javascript/examples/kml/westcampus.kml';
    
          function initMap() {
            map = new google.maps.Map(document.getElementById('map'), {
              center: new google.maps.LatLng(-19.257753, 146.823688),
              zoom: 2,
              mapTypeId: 'terrain'
            });
    
            var kmlLayer = new google.maps.KmlLayer(src, {
              suppressInfoWindows: true,
              preserveViewport: false,
              map: map
            });
            kmlLayer.addListener('click', function(event) {
              var content = event.featureData.infoWindowHtml;
              var testimonial = document.getElementById('capture');
              testimonial.innerHTML = content;
            });
          }
        </script>
        <script async
        src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY_HERE&callback=initMap">
        </script>
      </body>
    </html>

     

    The example is from google and it is working fine but i removed my API Key : in YOUR_API_KEY_HERE

    Can the same idea work with the UniMap?

    best regards

     

    Do you want to import kml file or show images in the map?

  4. 2 hours ago, M.Ammar said:

    Hi, 

    Regarding Tunimap i have 2 questions,

    1- i have been using TuniMap with OSM layer because google never worked for me "empty page" although i set up UniMapKeys in servermodule like the demo and the same key is working for another ASP.net project with no issue.

    2- how can i add a very large floor plan layer (1200m * 900m) on certain location, can i use Png file and how can i do it? as i cannot Drow over 1000 irregular shape

    currently testing with V 1.90.0.1568

    regards

     

     

    Hello

    Google map works. Did you check the demo?

    I'll check how to add images as layer

     

    • Like 1
  5. 20 hours ago, andyhill said:

    When we add a Vector to the UniMap we have the option of VectorType (polygon/circle etc.), LineColor, LineWeight etc. BUT I cannot see LineType.

    I would like to use DASHED and DOTTED options. Does it have something to do with Options.dashArray ? I tried Options.dashArray:= '4 1' but no change (also '4, 1').

    Please show in code how to create a DASHED Line Vector polygon - Thanks in advance.

    Please try dashArray option

    Options.dashArray := '20 20';

    image.thumb.png.d4802e132e5a5927ac2f579ade9954e6.png

×
×
  • Create New...