Following up with previous commit at c12bd4c, where the file GeoJSON.js was added, it would seem there would still be a problem of namespace conflict with Geofield Map's GeoJSON:
If Baidu Map and Google Map are enabled and selected for 2 fields on the same entity (node, type page, for example), the files GeoJSON.js of both modules would be loaded and since Geofield Baidu Map's GeoJSON object currently has the same name/namespace as the one from Geofield Map, there is a problem of display due to an object overridden.
This could be fixed by modifying the name of the function GeoJSON to BaiduMapGeoJSON, for example.
Please let me know if you would have any questions, objections, comments, suggestions, recommendations or concerns on any aspects of bug report, I would be glad to provide more information or explain in more details.
Any questions, feedback, testing, changes, ideas or recommendations would be highly appreciated.
Thanks to all in advance.
Comments
Comment #1
xiukun.zhou commentedQuick follow-up on this bug report:
Changed the name of the GeoJSON function to BaiduMapGeoJSON in GeoJSON.js file and its call in geofield_baidu_map.js.
Tested with the Geofield Map and Baidu Map display formatters for two distinct fields on the same page and they should now display properly without any conflict anymore.
I went ahead and committed the changes against the 7.x-1.x branch at 71cf9a6.
I allowed myself to mark this issue as fixed for now, but feel free to re-open it, or post a new ticket, at any time if you have any further objections with this issue or related commit 71cf9a6 (we would surely be happy to hear your feedback).
Please let me know if you would have any further comments, feedback, questions, issues, objections, suggestions or concerns on the commit or this bug report in general, I would be glad to provide more information or explain in more details.
Thanks in advance to everyone for your testing, reviews, feedback and comments on this issue.
Cheers!