1/** 2 * Camera Control Module 3 * ProParcelApp uyumluluk katmanı â tüm odaklama ParcelCameraManager üzerinden. 4 */ 5 6function _pcm() { 7 return window.ParcelCameraManager || null; 8} 9 10/** 11 * Camera control methods for ProParcelApp 12 */ 13export function createCameraMethods(app) { 14 return { 15 focusCameraOnCenter(centerCoords) { 16 if (typeof window.isTkgmModeActive === 'function' && window.isTkgmModeActive()) { 17 return; 18 } 19 if (!centerCoords || !Array.isArray(centerCoords) || centerCoords.length < 2) { 20 return; 21 } 22 const pcm = _pcm(); 23 if (pcm && typeof pcm.focusOnGeometry === 'function') { 24 pcm.focusOnGeometry({ type: 'Point', coordinates: centerCoords }, { force: true, source: 'center' }); 25 return; 26 } 27 try { 28 const map3d = this.mapManager.getMap('3d'); 29 if (!map3d) return; 30 let lon, lat; 31 try { 32 const cu = this.coordinateUtils || window.coordinateUtils; 33 if (cu && typeof cu.toLngLat === 'function') { 34 const ll = cu.toLngLat(centerCoords); 35 lon = ll[0]; 36 lat = ll[1]; 37 } else { 38 lon = Number(centerCoords[0]); 39 lat = Number(centerCoords[1]); 40 } 41 } catch (_) { 42 lon = Number(centerCoords[0]); 43 lat = Number(centerCoords[1]); 44 } 45 const is3DActive = this.mapManager?.is3DModeActive?.(); 46 map3d.flyTo({ 47 center: [lon, lat], 48 zoom: 19, 49 duration: 1800, 50 essential: true, 51 bearing: 0, 52 pitch: is3DActive ? 45 : 0, 53 }); 54 } catch (_) {} 55 }, 56 57 focusCameraOnParcel(coordinates) { 58 const pcm = _pcm(); 59 if (pcm && typeof pcm.focusOnGeometry === 'function') { 60 pcm.focusOnGeometry({ type: 'Polygon', coordinates }, { force: true, source: 'legacyParcel' }); 61 } 62 }, 63 64 focusCameraOnParcelBounds(geoData) { 65 const pcm = _pcm(); 66 if (pcm && typeof pcm.focusOnGeometry === 'function') { 67 pcm.focusOnGeometry(geoData, { source: 'legacyBounds' }); 68 return; 69 } 70 if (typeof window.isTkgmModeActive === 'function' && window.isTkgmModeActive()) { 71 return; 72 } 73 }, 74 }; 75}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.