This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-13
Channels
- # announcements (1)
- # beginners (155)
- # calva (104)
- # cider (7)
- # clj-kondo (55)
- # cljdoc (2)
- # cljs-dev (19)
- # cljsrn (22)
- # clojure (230)
- # clojure-europe (1)
- # clojure-italy (15)
- # clojure-losangeles (8)
- # clojure-nl (11)
- # clojure-spec (20)
- # clojure-uk (30)
- # clojurescript (10)
- # code-reviews (32)
- # cursive (2)
- # data-science (6)
- # datascript (3)
- # datomic (141)
- # fulcro (1)
- # graphql (6)
- # jobs-discuss (19)
- # luminus (8)
- # off-topic (30)
- # pathom (2)
- # protorepl (8)
- # reagent (15)
- # reitit (3)
- # shadow-cljs (11)
- # tools-deps (1)
- # xtdb (8)
react-native-maps: am I misunderstanding how to translate https://github.com/react-native-community/react-native-maps#mapview once I've got the dependencdies all figured out?
Trying to get react-native-maps to work
So basically, I can't get myself a MapView (https://github.com/react-native-community/react-native-maps/blob/master/docs/mapview.md). I've tried re-natal require react-native-map/MapView
, trying to get (.-MapView react-native-map)
, and others, and just can't find the MapView
@worlds-endless I am using react-native-maps
, let me check to see how I have it set up
Thank you!
So my map-view
is
(def react-native-maps (js/require "react-native-maps"))
(def map-view (r/adapt-react-class (.-default react-native-maps)))
I think that’s the difference there
I saw that default and was wondering about that. So you don't have "map-view" or any such thing included as a component in your .renatal file?
You still need that
It’s in my modules
array in .re-natal
Which puts it into index.js
when you run re-natal use-figwheel
strange... when I try to include "react-native-maps/MapView" in my deps, react-native can't compile
Which deps are you talking about?
.renatal modules
I just have "react-native-maps"
ok; so you don't have to add it as a sub-component
On the version I’m on at least, no
0.21.0 for reference
Ok; compiler isn't failing now. May I ask what your [map-view ...] call looks like?
Is it just a {} as an arg, or do you need clj->js?
Just {}
[map-view {:style {:flex 1}
:shows-user-location true
:map-type "mutedStandard"
:region {:latitude (:loc/lat @location)
:longitude (:loc/lon @location)
:latitudeDelta 0.09
:longitudeDelta 0.04}}
;;; ...
]