-
-
Notifications
You must be signed in to change notification settings - Fork 38
Markers in the Map are not printed #32
Comments
@TARMAH Thank you for reporting the issue. This issue is quite similar to #2 and #31. This plugin is currently only supporting layers which are contained in style.json. If you add other layers such as FeatureState, ICON and marker after loading style.json, it will not be appeared PNG image through this plugin. The plugin restore layers from mapbox-gl-export/lib/map-generator.ts Lines 166 to 193 in 0bf17ba
I think it also requires to restore markers after this part. If do so, I assume markers will be exported to an image. Currently, I don't have enough time to do this, but welcome any pull request to implement this feature to the export plugin. |
@TARMAH Thank you for sharing your solution. Yes, your solution, which adds vector layers and sources into Map object instead of using Marker objects, can work well with this plugin. |
Why hasn't this been resolved? Seems like a pretty logical requirement to show the markers on the map that is printed. |
I was using react-map-gl which is a suite of React components for Mapbox GL JS-compatible libraries. I wanted to implement the exact same functionality as this library but the problem is that the markers in my map are not printed . I tried to use Mapbox GL JS and also added a sample marker just to see if the marker is printed but to no avail .
The getMap() exposes the Mapbox API here as stated in the documentation of react map gl.
I also printed the map object (mapRef.current) and as we can see the map does contain the marker in it but is not printed.
As far as i see the library only prints the lower layer of map but i also want to print the Pins(Markers) which get populated when the api is called. Can you please help ?
The text was updated successfully, but these errors were encountered: