Closed pasl closed 1 year ago
Hey @pasl, thanks for the suggestion! Added a getMapObject()
function.
Thanks !
I am using the library with importmap with this link
pin "mapkick", to: "https://ga.jspm.io/npm:mapkick@0.1.1/dist/mapkick.js"
Are you going to make a new release ?
Not right now (planning to make 0.2.0 a bigger release), but you can build dist/mapkick.js
with the instructions here.
Just fyi, 0.2.0 is out.
Cool I did a manual import in my projet and I seems to run fine.
Do you know by any chance how to enable the new 0.2.0 version for importmap with JSPM CDN ?
https://generator.jspm.io https://generator.jspm.io/
The new URL should be :
@.***/dist/mapkick.js
I keep getting this error with the generator :
Error: No '.' exports subpath defined in ***@***.***/ resolving mapkick imported from https://generator.jspm.io/.
Le 17 janv. 2023 à 20:28, Andrew Kane @.***> a écrit :
Just fyi, 0.2.0 is out.
— Reply to this email directly, view it on GitHub https://github.com/ankane/mapkick.js/issues/3#issuecomment-1386333571, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHPUN4RDABVP5BDW2BGUJ3WS5BMBANCNFSM6AAAAAAT2ZKPWI. You are receiving this because you were mentioned.
Hey @pasl, this should be fixed in 0.2.1 (just released).
It seems to import fine in the JSPM generator now. At least the error don’t show anymore. I’ll give it a try tomorrow and let you know. Thanks for your work Andrew!Le 19 janv. 2023 à 21:16, Andrew Kane @.***> a écrit : Hey @pasl, this should be fixed in 0.2.1 (just released).
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
For some reasons the JSPM (CDN) importmap link is not the same for version 0.2.1 than for 0.1.1.
0.1.1 = ***@***.***/dist/mapkick.js
0.2.1 = ***@***.***/dist/mapkick.esm.js
Nb: without the .esm v0.2.1 give error: Importing binding name 'default' cannot be resolved by star export entries.
I was able to make it work in my Rails 7 and impormap with the following configuration:
config / importmap
pin "mapkick", to: ***@***.***/dist/mapkick.esm.js
pin "mapbox-gl", to: ***@***.***/dist/mapbox-gl.js"
javascript / application.js
import mapboxgl from "mapbox-gl"
window.mapboxgl = mapboxgl
mapboxgl.accessToken = my_token
import Mapkick from "mapkick"
window.Mapkick = Mapkick
I tested it with Safari and Chrome on Macintosh without any issue so far.
Le 19 janv. 2023 à 21:23, Pascal Laplante @.***> a écrit :
It seems to import fine in the JSPM generator now. At least the error don’t show anymore.
I’ll give it a try tomorrow and let you know.
Thanks for your work Andrew!
Le 19 janv. 2023 à 21:16, Andrew Kane @.***> a écrit :
Hey @pasl https://github.com/pasl, this should be fixed in 0.2.1 (just released).
— Reply to this email directly, view it on GitHub https://github.com/ankane/mapkick.js/issues/3#issuecomment-1397844293, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHPUN675HOY3F6DUCWCPYTWTHYPBANCNFSM6AAAAAAT2ZKPWI. You are receiving this because you were mentioned.
Hi
There is a know issue with mapboxgl and when we create a map inside a bootstrap modal the width of the map is not set correctly.
A fix to this is to call map.resize() when the dom is fully loaded.
Would be nice to have a way to access map (mapboxgl) object through Mapkick class.
For example:
var my_map = new Mapkick.Map( "map" ...) my_map.map.resize()