How can I integrate Cesium to desktop App on mac OSX

HI all.

I want to use Cesium in my mac OSX apps.

My app is use WebView Component which shows local html files.

when html file puts on HTMLHOME dirctories works fine.

but I’m put on it to Application Bundle area its not working.

I’m tried to modification

and
@import url(/Build/Cesium/Widgets/widgets.css);
lines to

@import url(/Users/XXXX/htmlhome/Build/Cesium/Widgets/widgets.css);

but it not works.

the Inspector of Safari says

file://dev.virtualearth.net/REST/v1/Imagery/Metadata/Aerial?incl=ImageryProviders&key=Aj1ony_-Typ-KjG9SJWiKSHY23U1KmK7yAmZa9lDmuF2osXWkcZ22VPsqmCt0TCt&jsonp=jsonp834649
Failed to load resource: The requested URL was not found on this server.

some one knows a solution?

PS:
I’m Sorry my english is so broken.

By default, Cesium uses // for all URLs so that they work under both http and https. All you need to do is configure an imagery provider explicitly. For example:

var viewer = new Cesium.Viewer(‘cesiumContainer’, {

baseLayerPicker : false,

imageryProvider : new Cesium.BingMapsImageryProvider({

url: ‘http://dev.virtualearth.net

})

});

should work.

thx Matthew.

2015年4月8日水曜日 2時43分06秒 UTC+9 Matthew Amato:

Matt, is there a way to programmatically loop through the current list of imagery providers (the base set) and change the url to include the http: in the front? Or would it be easier to just extract the data from the built in providers and not include the default BaseLayerPicker and build my own with them included?

I'm trying to the same thing as Katsu but the // urls are messing me up because they default to file://. I'd like to include the same set of default providers that come with Cesium, but I don't want to have to go into Cesium's source and manually change the urls at each update.

Thoughts?

You can copy the function from https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Widgets/BaseLayerPicker/createDefaultImageryProviderViewModels.js (which creates the defualt providers) and modify them to whatever you like. You then pass that array to the Viewer constructor.