Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No icons or images are output #15

Closed
21601-kimura opened this issue Jun 1, 2022 · 3 comments · Fixed by #18
Closed

No icons or images are output #15

21601-kimura opened this issue Jun 1, 2022 · 3 comments · Fixed by #18

Comments

@21601-kimura
Copy link
Contributor

Describe the bug
No icons or images are output.

error :
Image "***" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.

To Reproduce
Use LoadImage() and addImage()

Expected behavior
Icon or image is output.

Desktop (please complete the following information):

  • OS: Windows10
  • Browser Google Chrome
  • Version latest
@JinIgarashi
Copy link
Member

@21601-kimura Thank you for the issue. This plugin only can export current style.json in map object. There is no style information about additional icon images other than sprite. You have to add your own icons after this source code.

const renderMap = new MaplibreMap({
container,
style,
center: this.map.getCenter(),
zoom: this.map.getZoom(),
bearing: this.map.getBearing(),
pitch: this.map.getPitch(),
interactive: false,
preserveDrawingBuffer: true,
fadeDuration: 0,
attributionControl: false,
// hack to read transfrom request callback function
transformRequest: (this.map as any)._requestManager._transformRequestFn,
});

Maybe the plugin can have an optional parameter to apply any additional style into exported map.
Feel free to make pull request to the repository to add this feature.

@JinIgarashi
Copy link
Member

watergis/mapbox-gl-export#31 is also the same issue with this one

21601-kimura pushed a commit to 21601-kimura/maplibre-gl-export that referenced this issue Jun 2, 2022
@JinIgarashi JinIgarashi linked a pull request Jun 28, 2022 that will close this issue
7 tasks
JinIgarashi pushed a commit that referenced this issue Jun 28, 2022
@JinIgarashi
Copy link
Member

@21601-kimura I am sorry for the late reply. Thank you for fixing the bug.I have released as v1.3.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants