It loads by osgDB::readNodeFile() without problems, I can get a MapNode from there and use it to show the Earth and Moscow water at the correct coordinates. But here the model path and style is "hard-coded" inside the .earth file. I'd rather load ".shp" files with corresponding styles on demand.
I've tried to look what osgEarth does to load the file (step-by-step tracing in a debugger), but got lost due to the amount of templated functions, functors and virtual calls. I guess this complexity is due to the generality of osgDB::readNodeFile().
I suspect that to do this manually, I don't have to learn all the things deep inside osgDB::readNodeFile(), and there's something more special, easier to use.
So, how do I load the file and attach it to my map node? I've tried following instructions in the FAQ entry "How do I place a 3D model on the map?", but I just didn't get the model visible. And another concern with the instructions is that the code there calls model->setPosition(...), which in my case of ".shp" file seems extraneous, since it already specifies the coordinates.