Not a LatLng or LatLngLiteral: in property lat: not a number

Hi guys, I am trying to display markers form a JSON file and am encountering this error right now:

The map loads fine though and I can see my parsed array of objects in the developer window.

If someone can suggest how I can properly get the coords from the array so the markers will display that would be wonderful.

Here is the JSON:

It seems as though its within calEvents.locations.coords yet I am unsure how to parse this in the function.

here is my home.ts marker functionality:

let latLng = new google.maps.LatLng(43.653908,-79.384293);
let mapOptions = {
mapTypeId : google.maps.MapTypeId.ROADMAP
} = new google.maps.Map(this.mapElement.nativeElement, mapOptions);



for(let marker of markers){
  var loc = {lat: marker.latitude , lng: marker.longitude};
  marker = new google.maps.Marker({
  position: loc,



Any help is appreciated. Thanks!

@abpatola what is your server running on, Windows or Linux?
In any case, it seems your web server does NOT understand unicode nor UTF-8 simple character translations. Can you check in your files or webserver?

I elaborate, most apache, php, mysql versions nowadays need utf-8, to make simple operations like multiply, divisions etc…

Hope it helps a bit,


I am using a Mac and launching in Chrome

I just want the lats and langs from the array of objects in the JSON file to display. It works fine displaying them from a sample array in a database locally… just not with this JSON.

I can use


for example and it will display markers from that file that has lats and longs listed in a simple array. So I figure I am not passing the coords in correctly from that JSON file…

@abpatola then try the Ionic way to unfold a xml file, then process it:

makeGetRequest() {
this.http.get('').map(res => {
let posts = res.json();
xml2js.parseString(posts, ((result) => {
return result;
(data) => console.log(data),
(err) => console.log(err)

map==>res() something like this example above.

Have fun with Ionic,

it is a JSON file though…

then go look at ionic docs, it’s x10 easier to grab and retrieve data from it.

I have looked at the docs and unfortunately I can only have a JSON file

I don’t understand sorry, xml is not good, then json is not enough. Be precise in question please :slight_smile: