File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -844,7 +844,7 @@ class ThreeLayer extends maptalks.CanvasLayer {
844844 * @param {Object } options
845845 * @return {Array }
846846 */
847- identify ( coordinate : maptalks . Coordinate , options : object ) : Array < BaseObject | THREE . Object3D > {
847+ identify ( coordinate : maptalks . Coordinate | maptalks . Point , options : object ) : Array < BaseObject | THREE . Object3D > {
848848 if ( ! coordinate ) {
849849 console . error ( 'coordinate is null,it should be Coordinate' ) ;
850850 return [ ] ;
@@ -950,6 +950,15 @@ class ThreeLayer extends maptalks.CanvasLayer {
950950 return ( maptalks . Util . isNumber ( count ) && count > 0 ? pickResult . slice ( 0 , count ) : baseObjects ) ;
951951 }
952952
953+ identifyAtPoint ( point :maptalks . Point , options = { } ) {
954+ const map = this . getMap ( ) ;
955+ if ( ! map ) {
956+ return [ ] ;
957+ }
958+ const coordinate = map . containerPointToCoordinate ( point ) ;
959+ return this . identify ( coordinate , options ) ;
960+ }
961+
953962 /**
954963 * Recursively finding the root node of mesh,Until it is scene node
955964 * @param {* } mesh
You can’t perform that action at this time.
0 commit comments