title: Public API how to use in php/json /jquery files
body: <p>Here is the structure of my php file:</p>
  <pre><code>$lab = array(
  &quot;repartition&quot; =&gt; array (
      array( 
          &quot;latLng&quot; =&gt; array( xxx, xxx ),
          &quot;name&quot; =&gt; &quot;Paris&quot;,
          &quot;code&quot; =&gt; &quot;FR-75&quot;
          )
      ),
      array (
          &quot;latLng&quot; =&gt; array( xxx, xxx ),
          &quot;name&quot; =&gt; &quot;Grenoble&quot;,
          &quot;code&quot; =&gt; &quot;FR-38&quot;
      )
  )
  </code></pre>
  <p>I just wondering if I can retrieve the LatLng array from an address public API.</p>
  <pre><code>https://api-adresse.data.gouv.fr/search/?q=paris&amp;limit=1
  </code></pre>
  <p>In the vectorMap, I was able to retrieve the appropriate values as below, but it's on MarkerClick:</p>
  <pre><code>onMarkerClick: function(event, index) {
      var city= data2[0].repartition[index].name;
      //var latt = data2[0].repartition[index].latLng[0];
      //var long = data2[0].repartition[index].latLng[1];
  
      $.getJSON(&quot;https://api-adresse.data.gouv.fr/search/?q=&quot; + city+ &quot;&amp;limit=1&quot;, function (dt){
        var newlatt = dt.features[0].geometry.coordinates[1];
        var newlong = dt.features[0].geometry.coordinates[0];     
    })
  </code></pre>
  <p>But I wasn't able to retrieve it on the markers value. Markers is coded like that:</p>
  <pre><code>markers: data2[0].repartition,
  </code></pre>
  <p>My best way then is to create a function in php, but I don't know how to create it and retrieve the values in &quot;latLng&quot; =&gt; array( xxx, xxx ).</p>
  <p>Thanks in advance for your help.</p>