putting bing map api key in Cesium.js

928 views
Skip to first unread message

Victor Shum

unread,
Jun 9, 2016, 3:22:24 PM6/9/16
to cesium-dev

Hi, 

From the MS portal I have  created the bing map key .
Now according to cesium.org/data_and_assets/imagery/bing-maps.html  I should put the key using Cesium.BingMapsApi.defaultKey= .. 
I saw that as an edit in the Cesium.js file.  However there are the minified file and there is a non-minified one in the cesium build folder.
My question is whether I should put the key in the minified file directly. 

Thanks!

Best,
Victor

Kevin Ring

unread,
Jun 9, 2016, 6:09:23 PM6/9/16
to cesiu...@googlegroups.com

Hi Victor,

There is no need to modify any Cesium source file.  Just out that line in your application code before the line that creates Cesium.Viewer.

Kevin

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Victor Shum

unread,
Jun 9, 2016, 6:52:32 PM6/9/16
to cesium-dev
Thanks Kevin!

I tried first to put that in inside the Sandcastle script function before the viewer but it did not work.
Putting the key in the Source/Core/BingMapsApi.js did work though.

Rgds,
Victor

joelr...@gmail.com

unread,
Jun 9, 2016, 9:41:58 PM6/9/16
to cesium-dev
I put the API in the line: "BingMapsApi.defaultKey =" in the BingMapsApi.js script and I am still only getting a starfield. Any ideas?

Victor Shum

unread,
Jun 9, 2016, 11:44:36 PM6/9/16
to cesiu...@googlegroups.com
Did you put 'your key' after = after using the portal to create your key?


On Thursday, June 9, 2016, <joelr...@gmail.com> wrote:
I put the API in the line: "BingMapsApi.defaultKey =" in the BingMapsApi.js script and I am still only getting a starfield.  Any ideas?

joelr...@gmail.com

unread,
Jun 10, 2016, 12:21:09 AM6/10/16
to cesium-dev
Right after the equal sign I put the API key in quotes

Victor Shum

unread,
Jun 10, 2016, 12:40:19 AM6/10/16
to cesiu...@googlegroups.com
I put single quote ' not " . Not sure if that mattered though.


On Thursday, June 9, 2016, <joelr...@gmail.com> wrote:
Right after the equal sign I put the API key in quotes

Reply all
Reply to author
Forward
0 new messages