| 183 | |
| 184 | // Subscribe to each inner path's events |
| 185 | const subscribeToInnerPath = ( |
| 186 | innerPath: google.maps.MVCArray<google.maps.LatLng> |
| 187 | ) => { |
| 188 | listeners.push( |
| 189 | google.maps.event.addListener(innerPath, 'insert_at', handlePathsChange) |
| 190 | ); |
| 191 | listeners.push( |
| 192 | google.maps.event.addListener(innerPath, 'remove_at', handlePathsChange) |
| 193 | ); |
| 194 | listeners.push( |
| 195 | google.maps.event.addListener(innerPath, 'set_at', handlePathsChange) |
| 196 | ); |
| 197 | }; |
| 198 | |
| 199 | // Subscribe to existing inner paths |
| 200 | for (let i = 0; i < mvcPaths.getLength(); i++) { |