Closed lassemt closed 9 years ago
http://examples.webglearth.com/#markers
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)
.
Thanks for you answer @klokan . I tried and got error in console: Uncaught TypeError: c.show is not a function in api.js on line 122.
My marker code is:
marker = TravelingTheGoodVibes.map.initMarker( position[0], position[1], "http://www.travelingthegoodvibes.dev/content/uploads/2014/08/test_logo.png", 75, 111);
And is it possible to make a non-image marker? Use div instead, and then style it with css ect.?
Although the above mentioned way should work as described, the alternative is to use WE.marker
.
See update example: http://examples.webglearth.com/#markers
You can also use completely custom DOM instead of image. For example https://github.com/cultureglobe/cultureglobe/blob/master/src/main.js#L413 uses this to create custom elements.
@petrsloup Is there a Javascript implementation example of the custom DOM method as you mentioned above?
Any comments on whether one can create custom DOM markes will be greatly appreciated
Hey!
Is there a way to create custom dynamic markers with webGL Earth?