invalid character constant in var

472 Views Asked by At

Im trying to load KML file into my app with this tutorial and I'm getting invalid character constant error at this line

var src = 'https://developers.google.com/maps/tutorials/kml/westcampus.kml';

Any ideas how to fix that?

1

There are 1 best solutions below

3
On

In Java, the syntax for a String is:

String src = "https://developers.google.com/maps/tutorials/kml/westcampus.kml";

Java Docs

That tutorial is in JavaScript, not Java.