The uniapp h5 end uses the map component to report an error Map key not configured.

Problem Description

When we need to use some external things in the process of developing the uniapp project in the front end, we need to explore how to obtain the values ​​we need. The problem I have encountered is that when using uniappthe development h5application, when using the map component ( <map></map>), an error is reportedMap key not configured.

report error

Cause Analysis

In your uniappproject, the third-party map that needs to be used is not configured key.

configuration

Solution

  1. Check a map service provider. I chose Tencent Maps. Of course, you can choose according to your needs.
    configuration 1
  2. Enter Tencent map key(application keymethod: application method of Tencent positioning service key )
    Configuration 2
  3. run successfully

insert image description here

Guess you like

Origin blog.csdn.net/Hannah_bb/article/details/127994113