Skip to content

ReferenceError: AMap is not defined #45

Description

@majian159
import {
    APILoader, ControlBarControl, Geolocation, Map, Marker, ScaleControl, ToolBarControl
} from '@uiw/react-amap';

        <APILoader akay="a7a90e05a37d3f6bf76d4a9032fc9129">
          <Map>
            <ScaleControl offset={[16, 30]} position="LB" />
            <ToolBarControl offset={[16, 10]} position="RB" />
            <ControlBarControl offset={[16, 180]} position="RB" />
            <Geolocation
              maximumAge={100000}
              borderRadius="5px"
              position="RB"
              offset={[16, 80]}
              zoomToAccuracy={true}
              showCircle={true}
            />
            <Marker
              title="北京市"
              position={new AMap.LngLat(116.405285, 39.904989)}
            />
          </Map>
        </APILoader>

WeChat70fecc3df7f2811c927814ae9a346ce9

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions