Giter VIP home page Giter VIP logo

Comments (5)

JserWang avatar JserWang commented on September 20, 2024

百度有一个类叫 LocalSearch

在当前版本您可以暂时自己使用LocalSearch进行查询,不依赖地图的情况下,举个例子:

const local = new window.BMap.LocalSearch("北京市", {
   onSearchComplete(result) {
       console.log(result.getPoi(0))
   }
});

local.search("百度大厦");

在下个版本中,会将类似上述代码改为Promise的形式稍微包装一下,作为Util方法暴露给开发者。

from rc-bmap.

JserWang avatar JserWang commented on September 20, 2024

@codepandy 关于LocalSearch的返回结果,可参考:
http://lbsyun.baidu.com/cms/jsapi/reference/jsapi_reference_3_0.html#a7b4

from rc-bmap.

JserWang avatar JserWang commented on September 20, 2024

另外,如果单纯的想拿到地址的话,可以通过百度提供的 Geocoder 类。

from rc-bmap.

JserWang avatar JserWang commented on September 20, 2024

https://github.com/jser-club/rc-bmap/blob/1e040f89649c38892c03adf1e3c91a47252a4f72/src/core/utils/map.js#L187#L198

可以看next分支对应的实现。

from rc-bmap.

codepandy avatar codepandy commented on September 20, 2024

嗯,好的,谢谢,辛苦了

from rc-bmap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.