We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
first position second position
const Map = Mapir.setToken({ transformRequest: (url) => { return { url: url, headers: { "x-api-key": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImE1YmQwZDQxMzg4NWVlMzQ1MDZlMTEwODdkNDg3MjFhZDlkMGNkZmVjODI5ZmY0MzMyYTQxNzFiM2E1ODU2YWEzMDM2OWY5NTIzYjI3NzhiIn0.eyJhdWQiOiIxMDg2OCIsImp0aSI6ImE1YmQwZDQxMzg4NWVlMzQ1MDZlMTEwODdkNDg3MjFhZDlkMGNkZmVjODI5ZmY0MzMyYTQxNzFiM2E1ODU2YWEzMDM2OWY5NTIzYjI3NzhiIiwiaWF0IjoxNjAwMjQyMzkxLCJuYmYiOjE2MDAyNDIzOTEsImV4cCI6MTYwMjkyNDM5MSwic3ViIjoiIiwic2NvcGVzIjpbImJhc2ljIl19.ZHDdjrHPwsQ0eq0fwZgFfofHreeKMOozyW4HItdSjrni8JIv6z_R5nwWq0ecOThc2t6JklxhQs_5bBf0c95l5_jeOSqewMB9DRvO8gyCvySpnDRuib8ULDsYdGMAnOanmrw2Ynfc07zHlYHpgV9sL7ydp2ydNWBHZ4dNXSoHSiZZgn7aoY6tSoxCRH4JqOZGpJ0uKPtKu3ZurIy1q0dNiks2_c8YXrpjMtJsKbleQ7wK8he9u3n_jsYBTIawxhjjCKxegOw1_CJBY3yuamSRJad1vzPwCmoPDM9rzjRXHU6Z-bWkfuxuhHSMj41SxxjWz64nSVD8jaAHqsAqY1c2rQ", "Mapir-SDK": "reactjs", }, }; }, });
const onDrag = (e) => { const lat = e?.transform?._center?.lat; const lng = e?.transform?._center?.lng; setLat(lat); setLng(lng); };
<Mapir Map={Map} userLocation onDrag={onDragEnd} > <Mapir.Marker coordinates={[lat, lng]} anchor="top" Image={LocationGreen} className="fixed top-0 left-0 right-0 bottom-0 bg-glass1" > </Mapir.Marker> </Mapir>
The text was updated successfully, but these errors were encountered:
hi, change lat,lng position to lng,lat . <Mapir.Marker coordinates={[lng,lat]} anchor="top" Image={LocationGreen} className="fixed top-0 left-0 right-0 bottom-0 bg-glass1" >
you can call us at this number 021-42070000
Sorry, something went wrong.
i can not move or drag on map !! @soudabeeh https://codesandbox.io/s/add-marker-forked-fk1g9?file=/src/index.js
for draggable marker use this: <Mapir center={[51.420470, 35.729054]} Map={Map} > <Mapir.Image id={"image-marker"} url={'markerURL'} /> <Mapir.Layer id="layer" layout={{ "icon-image": "image-marker", 'icon-allow-overlap': true }}> <Mapir.Feature coordinates={[51.420470, 35.729054]} draggable={true} /> </Mapir.Layer>
No branches or pull requests
first position
second position
The text was updated successfully, but these errors were encountered: