You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to generate mappings for this lib using Dukat, but the classes mapped in this way in the executable code are Undefined
The result is a code that does not work in the end
If you output a Google Map to the console, it will be Undefined
Maybe someone faced such a problem when mapping this lib or can give an example of the correct mapping for it ?
`@file:JsModule("@react-google-maps/api") @file:JsNonModule @file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
package components.reactGoogleMapsDukata
import org.khronos.webgl.*
import org.w3c.dom.*
import org.w3c.dom.events.*
import org.w3c.dom.parsing.*
import org.w3c.dom.svg.*
import org.w3c.dom.url.*
import org.w3c.fetch.*
import org.w3c.files.*
import org.w3c.notifications.*
import org.w3c.performance.*
import org.w3c.workers.*
import org.w3c.xhr.*
import react.PureComponent
import react.RProps
import react.RState
import react.ReactElement
import kotlin.js.*
external interface GoogleMapState : RState {
var map: Any?
}
@JsName("default")
external object GoogleMap : PureComponent<GoogleMapProps, GoogleMapState> {
open var mapRef: Element?
open var getInstance: () -> MapInstance?
open var panTo: (latLng: dynamic /* google.maps.LatLng | google.maps.LatLngLiteral */) -> Unit
open var setMapCallback: () -> Unit
open var getRef: (ref: HTMLDivElement?) -> Unit
override fun render(): ReactElement
}`
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I tried to generate mappings for this lib using Dukat, but the classes mapped in this way in the executable code are Undefined
The result is a code that does not work in the end
If you output a
Google Map
to the console, it will be UndefinedMaybe someone faced such a problem when mapping this lib or can give an example of the correct mapping for it ?
`@file:JsModule("@react-google-maps/api")
@file:JsNonModule
@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
package components.reactGoogleMapsDukata
import org.khronos.webgl.*
import org.w3c.dom.*
import org.w3c.dom.events.*
import org.w3c.dom.parsing.*
import org.w3c.dom.svg.*
import org.w3c.dom.url.*
import org.w3c.fetch.*
import org.w3c.files.*
import org.w3c.notifications.*
import org.w3c.performance.*
import org.w3c.workers.*
import org.w3c.xhr.*
import react.PureComponent
import react.RProps
import react.RState
import react.ReactElement
import kotlin.js.*
external interface GoogleMapState : RState {
var map: Any?
}
external interface GoogleMapProps : RProps {
var id: String?
get() = definedExternally
set(value) = definedExternally
var mapContainerStyle: Any?
get() = definedExternally
set(value) = definedExternally
var mapContainerClassName: String?
get() = definedExternally
set(value) = definedExternally
var options: Any?
get() = definedExternally
set(value) = definedExternally
var extraMapTypes: Array?
get() = definedExternally
set(value) = definedExternally
var center: dynamic /* google.maps.LatLng? | google.maps.LatLngLiteral? */
get() = definedExternally
set(value) = definedExternally
var clickableIcons: Boolean?
get() = definedExternally
set(value) = definedExternally
var heading: Number?
get() = definedExternally
set(value) = definedExternally
var mapTypeId: String?
get() = definedExternally
set(value) = definedExternally
var streetView: Any?
get() = definedExternally
set(value) = definedExternally
var tilt: Number?
get() = definedExternally
set(value) = definedExternally
var zoom: Number?
get() = definedExternally
set(value) = definedExternally
var onClick: ((e: MouseEvent) -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onDblClick: ((e: MouseEvent) -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onDrag: (() -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onDragEnd: (() -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onDragStart: (() -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onMapTypeIdChanged: (() -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onMouseMove: ((e: MouseEvent) -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onMouseOut: ((e: MouseEvent) -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onMouseOver: ((e: MouseEvent) -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onRightClick: ((e: MouseEvent) -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onTilesLoaded: (() -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onBoundsChanged: (() -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onCenterChanged: (() -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onHeadingChanged: (() -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onIdle: (() -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onProjectionChanged: (() -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onResize: (() -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onTiltChanged: (() -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onZoomChanged: (() -> Unit)?
get() = definedExternally
set(value) = definedExternally
var onLoad: ((map: MapInstance) -> dynamic)?
get() = definedExternally
set(value) = definedExternally
var onUnmount: ((map: MapInstance) -> dynamic)?
get() = definedExternally
set(value) = definedExternally
}
@JsName("default")
external object GoogleMap : PureComponent<GoogleMapProps, GoogleMapState> {
open var mapRef: Element?
open var getInstance: () -> MapInstance?
open var panTo: (latLng: dynamic /* google.maps.LatLng | google.maps.LatLngLiteral */) -> Unit
open var setMapCallback: () -> Unit
open var getRef: (ref: HTMLDivElement?) -> Unit
override fun render(): ReactElement
}`
Beta Was this translation helpful? Give feedback.
All reactions