plainheart opened a new pull request #12868:
URL: https://github.com/apache/incubator-echarts/pull/12868


   <!-- Please fill in the following information to help us review your PR more 
efficiently. -->
   
   ## Brief Information
   
   This pull request is in the type of:
   
   - [ ] bug fixing
   - [x] new feature
   - [ ] others
   
   
   
   ### What does this PR do?
   
   <!-- USE ONCE SENTENCE TO DESCRIBE WHAT THIS PR DOES. -->
   Added support for specifying initial map options.
   
   ### Fixed issues
   
   - #6902
   - #8422
   - #8806
   - #11802
   
   ## Details
   
   ### Before: What was the problem?
   
   <!-- DESCRIBE THE BUG OR REQUIREMENT HERE. -->
   Since Baidu Map sets `enableMapClick` as true by default, the POI's icon 
will be clickable when using ECharts bmap extension.
   This option can't be dynamically changed in runtime. We want to disable it 
to improve experience sometimes.
   
   <!-- ADD SCREENSHOT HERE IF APPLICABLE. -->
   
![image](https://user-images.githubusercontent.com/26999792/86098668-05763280-bae9-11ea-88a4-7b2ce4e5efa0.png)
   
   
   ### After: How is it fixed in this PR?
   
   <!-- THE RESULT AFTER FIXING AND A SIMPLE EXPLANATION ABOUT HOW IT IS FIXED. 
-->
   By specifying `enableMapClick` for `false`, POIs on map will be unclickable 
as we expect.
   
   ```js
   bmap: {
       center: [104.114129, 37.550339],
       zoom: 5,
       roam: true,
       mapOptions: {
           enableMapClick: false,
           maxZoom: 15,
           minZoom: 5
       }
   }
   ```
   
   <!-- ADD SCREENSHOT HERE IF APPLICABLE. -->
   
![image](https://user-images.githubusercontent.com/26999792/86099360-f8a60e80-bae9-11ea-9c2b-e5815d6f182e.png)
    
   
   ## Usage
   
   ### Are there any API changes?
   
   - [x] The API has been changed.
   
   <!-- LIST THE API CHANGES HERE -->
   - added a new option named `mapOptions`.
   
   ### Related test cases or examples to use the new APIs
   
   Refer to `test/bmap-mapOptions.html`.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to