webglearth / webglearth2

[UNMAINTAINED] WebGL Earth 2 - the source code of the project
Apache License 2.0
888 stars 212 forks source link

can i insert a picture to the map? #43

Closed careyv closed 9 years ago

careyv commented 9 years ago

I found a interface about Overlays,but could not insert custom image,you u help me?i hope insert custom picture. thx

petrsloup commented 9 years ago

You can pass additional parameters when creating a marker to specify a custom image (and its width and height). For example: app.initMarker(51.507222, -0.1275, url, width, height).

klokan commented 9 years ago

@careyv In case you want to create a map from your picture - so it is a new layer in WebGL Earth - then the easiest is to use http://www.maptiler.com/

MichaelPoP commented 9 years ago

@klokan

I would very much like to create a map from an image and apply it to a WebGL Earth instance using the tileLayerJSON method. However it has not been easy for me at all.

I downloaded the free version of maptiler and have converted my image (which has now map info btw, this is a creative usage of this tool) and it has given me an array of files. The most useful is the index.html file which would provide me a preview of my map overlay if I were hosting the file online.

I keep running into that problem, I have the photo and data and all i want to do is attach it to the map at the set coordinates but it is looking for a url, I would rather just host it locally!

Can you help me with this?

klokan commented 9 years ago

Textures and images for WebGL must be available via http:// protocol - so either you host the images somewhere online or you must start a webserver locally (such as with command python -m SimpleHTTPServer and access your files via http://localhost:8000/).