Leafletjs error: Invalid GeoJSON object

554
November 21, 2016, at 8:14 PM

I'm trying to populate a point layer using leafletjs but I keep getting an invalid GeoJSON object error. I have run the GeoJSON object I'm using through a linter and it comes back as valid. I'm a populating the coordinated property using an ajax call. If I put in some hard coded coordinates the points are populated just fine. Why am I getting this error when the object appears to be valid GeoJSON and why does it only happen when I populate the coordinates through ajax?

My ajax call:

$.get("/controller/twitter_get.php", function(data){
    var tweetData = $.parseJSON(data);
    tweetLocations = {
"type": "MultiPoint",
"coordinates": tweetData
    };

});

That call returns data like this:

"[[-81.569531,41.4598968],[-81.48370709,41.52049303],[-81.4773,41.5221]]"

The resulting GeoJSON object is:

{
"type": "MultiPoint",
"coordinates": [
[
  -81.569531,
  41.4598968
],
[
  -81.48370709,
  41.52049303
],
[
  -81.4773,
  41.5221
],
[
  -81.4773,
  41.5221
],
[
  -81.4773,
  41.5221
]]}
Rent Charter Buses Company
READ ALSO
Error	CS0266	Cannot implicitly convert type 'System.Linq.IQueryable<string>' to 'ExerciseDAL.Department'

Error CS0266 Cannot implicitly convert type 'System.Linq.IQueryable<string>' to 'ExerciseDAL.Department'

I am trying to display the department name when I enter an employees last name on the website interface and this is where I am having the problem!!! [nnn]namespace ExerciseDAL[nnn]{[nnn] public class DepartmentDAO[nnn] {.

306
How to wrap a json file with jsonp callback

How to wrap a json file with jsonp callback

I'm trying to parse a Json file response, but I'm having troubles. .

377
Wrapping jQuery.ajax: Cascading inner jqXHR as a new deffered object to return

Wrapping jQuery.ajax: Cascading inner jqXHR as a new deffered object to return

I'm now developing on a jQuery plugin, and I want to make some pre-process operations before $. ajax sends:.

280
Changing navigation class on window scroll not working right

Changing navigation class on window scroll not working right

I am making this website[nnn]DEMO SITE HERE.

311