Use MapBox in playground

Hello everyone

I want to use MapBox and BabylonJS together in Playground, is it possible to do it?
this is my PG, but it has some errors, i want to know is it possible to use it in playground?

You need a createScene function in your playground. See the default code of the default scene:

1 Like

hi @Evgeni_Popov

I have createScene function in my PG,

Yes, sorry for that.

It is document.querySelector('body').appendChild(div); and not document.querySelector('body').appendChild('div'); as well as var url = ""; instead of var url = "''";. Also, computeWorld and world don’t exist in your PG.

thank you so much, sorry for my mistake.

I deleted computeWorld and edited my code. but again I couldn’t see the map and the model.

You are still using a world matrix that does not exist, see line 71.

Look at the browser console and make sure you don’t have any error there:

1 Like

Sorry for my many questions. :sweat_smile:

I think I solved the problems, but I don’t know I can’t see the map.

i put mapbox api but on the console there is an error, is it possible to say me what is my problem?

It seems it is a duplicates of Is it possible to use MapBox inside babylonJS engine?, I think you should focus on the latter post.