zouyaoji / vue-cesium

🎉 Vue 3.x components for CesiumJS.
https://zouyaoji.top/vue-cesium
MIT License
1.49k stars 321 forks source link

Using a static image for billboards needs to be documented more clearly #60

Closed boriskogan81 closed 4 years ago

boriskogan81 commented 4 years ago

[文档问题] Using a static image for billboards needs to be documented more clearly

相关文档 URL

https://zouyaoji.top/vue-cesium/#/en/entity/vc-graphics-billboard

问题描述

I am deploying my app, using Vue Cesium, to Heroku, and have a .png in my static assets folder which I am trying to use for a billboard, like this: 
            this.billboards = this.$store.state.communities.map(community => {
                return {
                    position: {lng: community.coordinates.x, lat: community.coordinates.y},
                    image: '/img/TentLogo.png',
                    scale: 0.1,
                    id: community.id
                };
            })

I can see the .png file if I navigate to baseAddress/img/TentLogo.png, but the billboards are not showing up on the map. 

Previously, this worked ok locally, so I suspect it may have something to do with the environment, but am not sure how to troubleshoot it. 

Could I request a bit more detail on how linking static images in billboards works? 

改进建议

A bit more documentation on this issue.
zouyaoji commented 4 years ago

Please make sure that the URL of the picture can be successfully accessed after entering it in the address bar of the browser. Then try to write the entire path of this url to the image attribute.

boriskogan81 commented 4 years ago

The picture URL can be accessed ( https://itribe-frontend.herokuapp.com/img/TentLogo.png).

Setting the image attribute to this URL does not fix the problem.

Sincerely,

Baruch

On Fri, May 22, 2020 at 12:50 PM zouyaoji notifications@github.com wrote:

Please make sure that the URL of the picture can be successfully accessed after entering it in the address bar of the browser. Then try to write the entire path of this url to the image attribute.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zouyaoji/vue-cesium/issues/60#issuecomment-632604229, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACONT26N5WQDONU6I6XV62TRSZDHNANCNFSM4NHENS6Q .

zouyaoji commented 4 years ago

I tried it. This is because your background service does not allow cross-domain. The error message output from the browser console can be clearly seen. You can let the background service allow cross-domain, or front-end proxy to solve this problem. image

boriskogan81 commented 4 years ago

I'm running the application itself at the same domain as the image is hosted at.

http://itribe-frontend.herokuapp.com.

On Sat, May 23, 2020, 04:11 zouyaoji notifications@github.com wrote:

I tried it. This is because your background service does not allow cross-domain. The error message output from the browser console can be clearly seen. You can let the background service allow cross-domain, or front-end proxy to solve this problem. [image: image] https://user-images.githubusercontent.com/24430116/82718474-4d798c80-9cd5-11ea-8b43-1c53b6ec26c7.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zouyaoji/vue-cesium/issues/60#issuecomment-632960624, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACONT26FPRPUHC5FB2VOX6DRS4PDJANCNFSM4NHENS6Q .

boriskogan81 commented 4 years ago

I should also point out that migrating from 2.0.0 to 2.1.3 breaks the vc-layer imagery-an error is thrown regarding inability to find the viewModel:

index.js?22a4:924 Uncaught (in promise) TypeError: Cannot read property 'viewModel' of undefined
    at eval (index.js?22a4:924)
    at Array.forEach (<anonymous>)
    at VueComponent.registerEvents (index.js?22a4:923)
    at VueComponent.init (index.js?22a4:861)
    at eval (index.js?22a4:1029)

This should probably also be documented. This is a breaking change.

zouyaoji commented 4 years ago

The next version will solve this problem.

boriskogan81 commented 4 years ago

Great, looking forward to it.

I also notice that upgrading to the latest version has caused the Bingmaps imagery layer to stop working.

On Tue, May 26, 2020, 03:47 zouyaoji notifications@github.com wrote:

The next version will solve this problem.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zouyaoji/vue-cesium/issues/60#issuecomment-633755126, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACONT25FPITMHP3VFKHCE6TRTMGSNANCNFSM4NHENS6Q .

zouyaoji commented 4 years ago

I don't have this problem here. Please provide a reproduction method or example. It is recommended to create a new issue to discuss other issues.

boriskogan81 commented 4 years ago

It works with the latest version-thank you!