• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    API Google map

    Dashboard Designer & Custom AngularJS Pages
    2
    14
    3.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Jared WiltshireJ
      Jared Wiltshire
      last edited by

      @Fabier I'm sorry you are not making much sense to me. Maybe post some code snippets so I can get an idea of what you are trying to achieve.

      Developer at Radix IoT

      1 Reply Last reply Reply Quote 0
      • F
        Fabier
        last edited by Jared Wiltshire

        <div class="ma-designer-root" id="6cb5c3d4-93b8-41ba-8581-ad1113d45c1b" style="width: 1024px; height: 100px; position: relative; background-color: rgb(0, 1, 13); top: auto;" ma-center="true">
            <ma-watch-list-select id="23f7841d-5b31-4fdf-9f38-ea4f48035dde" ng-model="designer.watchList" parameters="designer.parameters" style="position: absolute; left: 0px; top: 30px;"></ma-watch-list-select>
        </div>
            <div id="59a9760c-d268-493f-a571-f3eefc1aa5d3" style="position: absolute; left: 333px; top: 0px; width: 362.875px; height: 34px; font-size: 160%; font-weight: 800;">UBICACIÓN NEVERAS COCA COLA</div>
           
            <ma-get-point-value id="20f80a36-3588-4830-a32a-46b2221184ec" style="position: absolute; left: 234.266px; top: 55px;" ng-bind="Latitud" point="designer.points | filter:{name:'Latitud'}:true | maFirst"></ma-get-point-value>
           
            <ma-get-point-value id="b2678643-51e6-47ba-acd9-af48e14ba9c5" style="position: absolute; left: 398px; top: 56px;" ng-bind="longitud" point="designer.points | filter:{name:'Longitud'}:true | maFirst"></ma-get-point-value>
        
        <ma-map id="b6d480d5-6d25-4f07-8726-f585b45ffdfa" lat="4.68401" long="-74.051" map-type="roadmap" info-window-theme="dark" desktop-height="600px" mobile-height="450px" style="width: 683.813px; height: 709px;" zoom="10">
            <marker position="{{Latitud.value}}, {{Longitud.value}}" on-click="$parent.$ctrl.setOutputData('DP_b6a0d213-4056-4cd0-9504-8707edb1fc82')"></marker>
           </ma-map>
        
        1 Reply Last reply Reply Quote 0
        • F
          Fabier
          last edited by

          @jared-wiltshire said in API Google map:

          I'm sorry you are not making much sense to me. Maybe post some code snippets so I can get an idea of what you are trying to achieve.

          this is my code, I want to create a map with a marker but this marker have to get the position agree a the value the watch-list

          1 Reply Last reply Reply Quote 0
          • Jared WiltshireJ
            Jared Wiltshire
            last edited by

            OK I can see what you are trying to do, your code looks correct. What exactly is the issue? Can you explain more what is going wrong?

            Are your Latitud and Longitud points numeric or string? Are they in decimal format if they are strings?

            Developer at Radix IoT

            F 1 Reply Last reply Reply Quote 0
            • Jared WiltshireJ
              Jared Wiltshire
              last edited by

              I would encourage you to put some tags into your code to inspect the value of variables and ensure they are correct. e.g.

              <pre ng-bind="designer.points | filter:{name:'Latitud'}:true | maFirst | json"></pre>
              <pre>{{Latitud.value}}, {{Longitud.value}}</pre>
              

              Developer at Radix IoT

              1 Reply Last reply Reply Quote 0
              • F
                Fabier @Jared Wiltshire
                last edited by

                @jared-wiltshire Thanks, The probles is that my market don't get the values. This is a point numeric.

                1 Reply Last reply Reply Quote 0
                • Jared WiltshireJ
                  Jared Wiltshire
                  last edited by

                  @Fabier Did you check the values of your variables on the page using the method I posted above? I can't make any more suggestions unless you give me some feedback. The only thing I can think of is removing the space between your lat and long.

                  Developer at Radix IoT

                  F 1 Reply Last reply Reply Quote 0
                  • F
                    Fabier @Jared Wiltshire
                    last edited by

                    @jared-wiltshire, yes, I can use your sentence and this is the response:

                    {
                    "enabled": true,
                    "templateXid": null,
                    "loggingProperties": {
                    "tolerance": 0,
                    "discardExtremeValues": false,
                    "discardLowLimit": -1.7976931348623157e+308,
                    "discardHighLimit": 1.7976931348623157e+308,
                    "loggingType": "ON_CHANGE",
                    "intervalLoggingType": "AVERAGE",
                    "intervalLoggingPeriod": {
                    "periods": 1,
                    "type": "MINUTES"
                    },
                    "overrideIntervalLoggingSamples": false,
                    "intervalLoggingSampleWindowSize": 0,
                    "cacheSize": 1
                    },
                    "textRenderer": {
                    "useUnitAsSuffix": true,
                    "unit": "",
                    "renderedUnit": "",
                    "format": "0.00000",
                    "suffix": "",
                    "type": "textRendererAnalog"
                    },
                    "chartRenderer": {
                    "timePeriod": {
                    "periods": 1,
                    "type": "DAYS"
                    },
                    "type": "chartRendererImage"
                    },
                    "modelType": "DATA_POINT",
                    "tags": null,
                    "validationMessages": [],
                    "id": 27,
                    "useIntegralUnit": false,
                    "useRenderedUnit": false,
                    "deviceName": "Trataminto_Dato",
                    "dataSourceId": 3,
                    "setPermission": "",
                    "chartColour": "",
                    "rollup": "NONE",
                    "plotType": "SPLINE",
                    "purgeOverride": false,
                    "purgePeriod": {
                    "periods": 1,
                    "type": "YEARS"
                    },
                    "pointLocator": {
                    "modelType": "PL.SCRIPTING",
                    "varName": "Lat",
                    "dataType": "NUMERIC",
                    "settable": true,
                    "relinquishable": false
                    },
                    "dataSourceXid": "TD_2C58D7",
                    "readPermission": "",
                    "dataSourceName": "Trataminto_Dato",
                    "unit": "",
                    "renderedUnit": "",
                    "pointFolderId": 0,
                    "integralUnit": "s",
                    "name": "Latitud",
                    "xid": "DP_b6a0d213-4056-4cd0-9504-8707edb1fc82",
                    "lastPayload": {
                    "xid": "DP_b6a0d213-4056-4cd0-9504-8707edb1fc82",
                    "event": "UPDATE",
                    "value": {
                    "dataType": "NUMERIC",
                    "value": 4.6840744,
                    "timestamp": 1519846997000,
                    "annotation": null
                    },
                    "renderedValue": "4,68407 ",
                    "convertedValue": 4.6840744,
                    "enabled": true,
                    "attributes": {}
                    },
                    "value": 4.6840744,
                    "time": 1519846997000,
                    "convertedValue": 4.6840744,
                    "renderedValue": "4,68407 ",
                    "unreliable": false
                    }
                    ,

                    F 1 Reply Last reply Reply Quote 0
                    • F
                      Fabier @Fabier
                      last edited by

                      How Can I get the value of latitud an longitud in my marker:

                      <marker position=xxxxx,xxxxx on-click="$parent.$ctrl.setOutputData('DP_b6a0d213-4056-4cd0-9504-8707edb1fc82')"></marker>

                      1 Reply Last reply Reply Quote 0
                      • Jared WiltshireJ
                        Jared Wiltshire
                        last edited by

                        @Fabier you have to use the tools I gave you to try and figure out what is happening. I can't do it for you.

                        You did not post what <pre>{{Latitud.value}}, {{Longitud.value}}</pre> displays. You have to check each of your variables and see if they have the correct value.

                        If you use the exact same code with a static value in the position attribute does it display the marker?

                        Developer at Radix IoT

                        F 1 Reply Last reply Reply Quote 0
                        • F
                          Fabier @Jared Wiltshire
                          last edited by

                          @jared-wiltshire when I post <pre>{{Latitud.value}}, {{Longitud.value}}</pre> the result is "," I don't get the values "Latitud" and "longitud".

                          When I used <pre ng-bind="designer.points | filter:{name:'Latitud'}:true | maFirst | json"></pre>.

                          The result was the one presented in the top of the forum.

                          1 Reply Last reply Reply Quote 0
                          • Jared WiltshireJ
                            Jared Wiltshire
                            last edited by

                            @fabier said in API Google map:

                            ng-bind="longitud"

                            I just noticed this in your code. This is wrong. I don't know where you got that from. Do not use ng-bind with <ma-get-point-value>, please read the documentation - YOUR_MANGO_URL/ui/docs/ng-mango/ma-get-point-value

                            Try this -
                            <marker position="{{(designer.points | filter:{name:'Latitud'}:true | maFirst).value}}, {{(designer.points | filter:{name:'Longitud'}:true | maFirst).value}}" on-click="$parent.$ctrl.setOutputData('DP_b6a0d213-4056-4cd0-9504-8707edb1fc82')"></marker>

                            Developer at Radix IoT

                            F 1 Reply Last reply Reply Quote 0
                            • F
                              Fabier @Jared Wiltshire
                              last edited by

                              @jared-wiltshire Thank you very much. Now I can see the point.

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post