Is there are any ways to generate KML for Google Earth with java script via node.js? Now I hava apache with PHP for that. Would be nice to have everything in one server.
I am quit new on js, if there are any axamples or something… I would appreciate it.
Yes you can! Doing so is actually quite easy. Node.js doesn’t handle files the same way PHP does, Node.JS will serve the client the files. There are tons of template systems available for node.JS for you to use. Here is an example of a KML server using some basic techniques.
And our template.ejs would look like this:
In reality you would want to use something like connect or express. It sounds like you are pretty new to Node.JS, definitely spend some going through some of the introduction material.
Happy Coding!