Creates images of text for use with Sprite and Image objects.
Load the file /modules/miniature.earth.textimage.js or copy the code to your script and customize it to your needs.
Returns an object with image, scale and resolution for use with Sprite and Image objects.
var text_image = Earth.TextImage.draw(
'North\nAmerica',
{
fontFamily : 'MyFont, sans-serif',
fontWeight : 'bold'
}
);
myearth.addImage( {
location : { lat: 39, lng : -98 },
image : text_image.image,
scale: text_image.scale * 0.8,
imageResolution : text_image.resolution,
color: '#333'
} );