title: Open weather map API , couldn't get JSON, but getting JSONP and couldnt make asynchronous call
body: <p>Am getting longitude and latitude values from google's webserivce and passing the values to open weather map api to get the temperature values. Code below</p>
  
  <pre><code>function getWeatherData(latitude, longitude) {
                              var temperature = 0;
  
                              var url = "http://api.openweathermap.org/data/2.5/weather?lat=";
                              url = url + latitude;
                              url = url + "&amp;lon=";
                              url = url + longitude;
                              url = url + "&amp;cnt=1";
  
  
                              $
                              .ajax({
                                  type : "POST",
                                  dataType : "jsonp",
                                  url : url + "&amp;callback=?",
                                  async : false,
                                  success : function(data) {
                                      temperature = data.list[0].main.temp ;
                                      alert (temperature);
  
                                  },
                                  error : function(errorData) {
                                      alert("Error while getting weather data :: "+errorData.status);
                                  }
                              });
  
                              return temperature;
  </code></pre>
  
  <p>So for this URL</p>
  
  <pre><code>http://api.openweathermap.org/data/2.1/find/city?lat=22.572646&amp;lon=88.36389500000001&amp;cnt=1
  </code></pre>
  
  <p>Am getting the below JSON response properly in the browser</p>
  
  <pre><code>{
      "message": 0.016,
      "cod": "200",
      "calctime": "",
      "cnt": 1,
      "list": [{
          "id": 1275004,
          "name": "Kolkata",
          "coord": {
              "lon": 88.36972,
              "lat": 22.569719
          },
          "distance": 0.999,
          "main": {
              "temp": 301.15,
              "pressure": 998,
              "humidity": 88,
              "temp_min": 301.15,
              "temp_max": 301.15
          },
          "dt": 1371217800,
          "wind": {
              "speed": 3.1,
              "deg": 150
          },
          "clouds": {
              "all": 40
          },
          "weather": [{
              "id": 721,
              "main": "Haze",
              "description": "haze",
              "icon": "50n"
          }]
      }]
  }
  </code></pre>
  
  <p>But while trying to hit the same using jQuery's ajax, I have no option except to get the values as JSONP, <strong>unable to get it as JSON</strong></p>
  
  <p>Since am unable to get JSON response, am not able to make the call asynchronous.</p>
  
  <p>I need to make asynchronous false. <strong>Because of this every time, the value temperature is set to 0 and am not able to get the actual temperature value which i get from the ajax call</strong></p>
  
  <p>Please help</p>