ãŸããã
ã¯ãããŸã㊠ããã®èšäºã®ç®çãç°¡åã«èª¬æããŸããiOSã¢ãã€ã«ã¯ã©ã€ã¢ã³ãã§YandexããããæŽæ°ãŸãã¯åã蟌ãå¿ èŠãããå Žåã«æéãç¯çŽããçµéšãå ±æããããšãã欲æ±ã
é»åã¡ãŒã«ã«ãŒãïŒå人çšã§ã¯ãªããããžãã¹ã®ã¿ïŒã®ä»£ããã«ãYandexMapkitã¢ããªã±ãŒã·ã§ã³ïŒ2017幎10æé ïŒãçµã¿èŸŒã¿ãŸããã çŽ3ãæåŸãçŸããå¬ã®æ¥ã«ãããŒã®ããã§ã«ãŒãã®ã¢ã³ããã€ãçã2æ¥ç®ã«æ éããŸãããã«ãŒãã¯ã«ããã£ã«ãªã£ãã ãã§ãã iOSã¯ã©ã€ã¢ã³ããšããŠãããã¯åœ±é¿ããŸããã§ããã ã¢ã³ãããŒãã®è²§ãã人ã ...ä»åã¯ã圌ãã¯äœã®é¢ä¿ããããŸããã§ããã åœæãå€ãã®ãããžãåããŸãã ïŒãã·ã¢ã®ãã¹ããã«ã¢ããã·ãå€åããªããã¡ã¯èŠããŠããŸããïŒ
ããã¯ãã¢ããªã±ãŒã·ã§ã³ããµãŒãããŒãã£ã®ãµãŒãã¹ã«é¢é£ä»ããããŠããå Žåãããšãã°ãAppleã®ã«ãŒãã®å®è£ ã以åã®ããŒãžã§ã³ã«åãæ¿ããŠãå¥ã®ã«ãŒãã«çœ®ãæããã®ã§ã¯ãªãããã®å Žåã®ãã©ã³ãBãããããšäŸ¿å©ã ãšããããšã§ã...
ããã«3ãæåŸã3æã®ã©ããã§ãYandexãããæçµçã«SDKãæŽæ°ãããšããæçŽãå±ããŸããïŒåã®æŽæ°ããçŽ4ã5幎åŸïŒã
ã-æŽæ°ã1幎ã§å€ããã®ããªãã«ããããèŠããã«ã ãã®åã«ãåã«å€ãããŒãžã§ã³1.0ããããŸãã
ãŸãããã¡ããããã®ãããªèŠåã®åŸãç§ãã¡ã¯åŒã£åŒµãããããã«ç§»è¡ãéå§ããŸãã... 3æåŸïŒ8æã«ïŒã
ãã³ã¡ã³ããã®æ®µéïŒïŒæ©èœã®ç¡å¹åïŒ
ããªãã¯ç§ã«èšã£ããã...ããã§æŽæ°ããããã®ãããããæŽæ°ããããããã€ãã®å Žæãä¿®æ£ãããããã ãã§ãã ããããæ°ãããããAPIã¯å€ããã®ãšå®å šã«äºææ§ããããŸãããããã«ãåŸã§å€æããããã«ãå€ãããŒãžã§ã³ãä»ã®ã«ãŒãã©ã€ãã©ãªã«ã¯ããã«äœ¿çšã§ããéèŠãªå¿ éåããããããããŸãã
ãããã£ãŠãmapkit 3.0ïŒèšäºã®å·çäžã«ããŒãžã§ã³3.1ããªãªãŒã¹ãããŸããïŒã ããã¥ã¡ã³ããžã®ãªã³ã¯ã§ãã
ãããŠããªãYandexããã®èŠåã«å ããŠïŒ äžæ¹ãXcode 10ã®ããŒã¿çã§ã¯ãå€ãããŒãžã§ã³ã®ã¯ãžã©ã䜿çšãããããžã§ã¯ãã¯ãC ++ãå éšã®ã©ããã§äœ¿çšãããŠãããæ°ããããŒãžã§ã³ã§ã¯éé£ãããŠãããããæãã«ã¯è¡ããŸããã ãµããªã¹ãã§ååãå€æŽããå¿ èŠããããããã§æŽæ°ããããšããå¿ èŠã§ããèŠããã«ãçµå±ã¯æŽæ°ããå¿ èŠãããã®ã§ãç§ã¯ãããããŸããã§ããã
1ïŒããŒãžã§ã³1.0ã§ã¯ãªããããã«3.0ã«SDKãæŽæ°ããŸãããã¡ããAPIã¯å€æŽãããŸãããã...
ãã®ãããå€ãYMKAnnotation Protocolã¯åçŽã«æ¬ èœããŠããŸã
è¿ éã«ãããã¯åŒ·å¶éé strigã®ããã«èŠããŸãïŒïŒããã¯è³ããã§ã¯ãªãããïŒãèšå·ã¯ããªãã®ããã«ãã®ããã«æ±ãããŸã...ãããã³ã«å®è£ ã®äŸïŒ
ããŠãç§ãã¡èªèº«ã§ã座æšïŒïŒã¡ãœããã®ä»£ããã«ããããã£ãäœæããŸãããã¹ãŠãã·ã³ãã«ã§ãã¡ãœããã¯åé·ã§ãã titleïŒïŒïŒã¯æªåœ¢æã®ã¿ã€ãã«ïŒïŒã«çœ®ãæããããŸãããäžæ¹ã§ãããããã£ãäœæããããšãã§ããŸãããããžã§ã¯ããå€æŽããå¿ èŠãããå Žæãããããããã®ã§ãæå笊ãåé€ããŸããã
ãããžã§ã¯ãã§ã¯ãYandex MapPocketããããŒã®ãããã«ãã€ã³ããŒããããªãããã3ã€ã®ã³ã³ãããŒã©ãŒãæ°å亀æããå¥ã®ã³ã³ãããŒã©ãŒã«CoreLocationãã€ã³ããŒãããå¿ èŠããããŸããã
ãããžã§ã¯ãå šäœã§äœ¿ãæ £ããYMKMapCoordinateïŒå€ãã¯ãžã©ïŒã®ååãå€æŽããªãããã«ãYMKPointïŒæ°ããã¯ãžã©ïŒã®ã¿ã€ããšã€ãªã¢ã¹ãäœæããŸãã
2ïŒãŸããããããæäœããããã«å°æ¥å¿ èŠã«ãªãããã€ãã®ããããã£ãäž»ã«ã²ãã¿ãŒã宣èšããŸãããïŒ
3ïŒæåã«äœæããã®ã¯YMKMapViewã§ãïŒãã¹ãŠåé¡ãããŸããããã®ãããªãªããžã§ã¯ãã¯ãŸã å©çšå¯èœã§ãïŒã 以åãç§ã¯ããã«ãããåæåããŸãããä»ããªãã¯ãããããããšãã§ããŸãããæåã«ããŒã眮ãå¿ èŠãããã®ã§ãããã¯ã¯ã©ãã·ã¥ããŸãïŒ çŸåšã®ããŒã¯æ©èœããªããããæ°ããããŒãèŠæ±ããå¿ èŠããããŸãã ããã¥ã¡ã³ãã«åŸã£ãŠãAppDelegateã«è¿œå ããŸãã ããŒãèšå®ããåŸã«ã®ã¿ãYMKMapViewãäœæããsetupMapïŒïŒã¡ãœããã§å¿ èŠãªæ¹æ³ã§æ§æã§ããŸãã
ããã§äœãèµ·ããããåŸã»ã©é©åãªèšå®ãå¿ èŠã«ãªãéçšã§è©³çŽ°ã«åæããŸã
4ïŒæ¬¡ã¯äœã§ããïŒãããŠãCLLocationã®åæäœçœ®ããããŸããããããã䜿çšããã«ã¯ãCoreLocationãã¬ãŒã ã¯ãŒã¯ãæåã§è¿œå ãããããŸãã¯...ãŸãã¯Yandex mapkitã®YMKPointã§çœ®ãæããå¿ èŠããããŸã
5ïŒããã«ããããã¯ãã®åº§æšãäžå¿ã«éåžžã«ç°¡åãªæ¹æ³ã§é 眮ãããŸããããçŸåšã¯åçŽãªæ¹æ³ã¯ãããŸãã
ããããããå°ãè€éã§å°ãæ·±ãããããªããžã§ã¯ãããããŸãïŒ... mapView.mapWindow.mapïŒ.Moveã ããã§ã¯ãYMKCameraPositionãªã©ã®ãªããžã§ã¯ãã®ååšã«ã€ããŠåŠç¿ããŸãã
6ïŒæ¬¡ã«ããã®ãããªapi /ããããã£ããªãããããããæ§æã«ã³ã¡ã³ãããŸãã å°ãªããšãæå°éã«éå§ããããã«ãããã§ã¯çç¥ããŸãã
泚éã®è¿œå ã«ã€ããŠã³ã¡ã³ãããŸãïŒããã¯æšæºã®æ©èœã§ããããšã«æ³šæããŸãïŒããŸããæãè¿ããã€ã³ãã®è¡šç€ºã«ã€ããŠãã³ã¡ã³ãããŸãïŒããã¯æ¢ã«äœããã®æ©èœã§ãïŒã
ãŸããYMKMapViewDelegateå šäœã解説ã§ããããã¯ãæ°ãããã¬ãŒã ã¯ãŒã¯ã§ã¯èŠã€ããããŸããã§ããããåæ§ã®é¡äŒŒç©ã§ããããŸãã
å®è£ ã¯çç¥ããã¡ãœããèªäœã®ã¿ãçç¥ããŸããã
-ãŠãŒã¶ãŒã®äœçœ®ã衚瀺ãããã©ããã
-ãã³ã«äœ¿çšãããã¥ãŒã
-泚éãã¯ãªãã¯ãããšãã®åå¿ã
-泚éã®ã³ãŒã«ã¢ãŠãã
-ã³ãŒã«ã¢ãŠããã¯ãªãã¯ãããšãã®åå¿ãã€ãŸããé垞䜿çšãããã¹ãŠã çµå±ãããçš®ã®APIã«ãŒãã䜿çšããäœããã®æ¹æ³ããããŸããã
ãã¹ãŠãMapVCã§èšç®ãããŸãã-ããã¯ãããããããã䜿çšãããã¡ã€ã³ã¯ã©ã¹ã§ã
7ïŒã«ã¹ã¿ã ã³ãŒã«ã¢ãŠãã«é¢ããå°ãã®ã³ã¡ã³ããYMKCalloutViewãç¶æ¿ããŸãããæ°ããã¯ãžã©ã«ã¯ãããããŸããã
ã»ãããããžã§ã¯ããéãŸã£ãã®ã§ãç§ã¯ãã¹ãŠãå§ããŠ...ç®±ã®äžã®ããŒãããã¯ãèŠãããšãã§ããŸãããéå§åŸãããªãã¯ããŠã©ãŒã ã¢ãããããæéãäžããå¿ èŠãããããïŒïŒïŒããããç§ã¯ããã«ã€ããŠç¥ãããäœããããã§ã¯ãªããšæã£ããã®ãããããŒãã¢ã¯ãã£ãã«ããã®ã«æéããããããšãææ¡ããŸãããã ä»®å®ãæ£ããããšãå€æããŸããã çŽ1æéåŸ ã€å¿ èŠããããŸãïŒå€åäœããå€ãã£ãã®ãããããŸããïŒã
å€ãAPIãæ°ããæ¹æ³ã§å€æŽããããšãããšããããã衚瀺ãããŸããã
ã¹ããŒãž2-ãæ€çŽ¢ãïŒå€ãæ¹æ³ãæ°ããæ¹æ³ã§å®è£ ããæ¹æ³ïŒ
倱ãããæ©èœã®åŸ©å ãå§ããŸãããã ãã®ããããŠãŒã¶ãŒããã¯ã衚瀺ããå¿ èŠããããŸããã以åã®æ¹æ³ã§ã¯ããããã£ãå€æŽããŠããªã²ãŒããèšå®ããã ãã§ã¯ã§ããŸããã
ããã¯ã¬ã€ã€ãŒãä»ããŠè¡ãããŸããsetupMapïŒïŒã¡ãœãããã€ã³ã3ãåç §ããŠãã ããã
ãã¢ã®äŸïŒ Yandex githubããããŠã³ããŒã ïŒãããã®ã§ãèŠãŠã¿ãŸããã ã ãšããã§ãsetAnchorWithã«æ³šæããå¿ èŠããããŸãã åŸã§èª¬æããŸããããºãŒã ã«é¢é£ããŠããŸãã ããããŸããå Žæã¯åäœããŸãã
2ïŒæ¬¡ã¯ãã¡ããã泚éã§ãã å€ãæ¹æ³ã§è¿œå ããããšã¯ã§ããŸãããããäžåºŠãã¢ãã芧ãã ããã ããã«ã¯ã©ã¹ããããŸã-MapObjectsViewControllerã æ°ããããŒãžã§ã³ã§ã¯ããã³ããããã«è¿œå ããããã«ããªã²ãŒãã¯å¿ èŠãããŸããããã®ãããmapObjectsããããã£ã«ã¢ã¯ã»ã¹ãããªããžã§ã¯ãã§addPlacemarkã¡ãœãããåŒã³åºããããã«åº§æšãæž¡ãå¿ èŠããããŸãïŒãŸã ä»ã®ãªãŒããŒããŒãããããŸãïŒäŸïŒ
ã¢ãããŒã·ã§ã³ã®ã³ã¬ã¯ã·ã§ã³ãå埩åŠçãïŒããšãã°ããµãŒããŒããåä¿¡ããåŸïŒããããã«è¿œå ããŸãã ã¡ãªã¿ã«ããã®ã¡ãœããã¯ãplaceMarkãïŒãã¬ãŒã¹ã©ãã«ïŒãè¿ããŸããããã¯ãããšãã°zIndexããããã£ã䜿çšããŠè¡šç€ºé åºãå€æŽãããªã©ãè¿œå ã®èšå®ãè¡ãããã«äœ¿çšã§ããŸãã
ããããããã§ãç§ã¯åã«ç»ã£ãŠä»£ç人ãæ¢ããŠã圌ãå®å šã«èŠã€ããããšãã§ãããåäžã®ä»£ç人ã§ã¯ãªãã£ããšããç¹ãéããŸããïŒå®éã圌ãã¯åã«å¥ã®ååã§åŒã°ãå§ããŸãããä»ã§ã¯åœŒãã¯ãªã¹ããŒã§ãïŒã Appleã¯ãžã©ãšå€ãYandexã¯ãžã©ã®ä»¥åã®çµéšãããã»ã«ãšåæ§ã«æ³šéãåå©çšãããããšãç¥ã£ãŠããŸããããã¢ã«ã¯addPlacemarkãããããŸããã Yandex-cardsã®ãªãŒãã«ã€ããŠã®è³ªåïŒå°ããªå人çãªç¥ãåããå©ããïŒã-ã¡ã¢ãªäœ¿çšéãæé©åããæ¹æ³ããªããžã§ã¯ããåå©çšããæ¹æ³ïŒã
泚ïŒ1ïŒYandex.Mapsã¯ããããããã䜿çšããéçºããªãããšã«æ³šæããããšãéèŠã§ãã ããã¯ãããããããããŒã ã«ãã£ãŠè¡ãããŸãïŒããã®ãã³ã©ã€ã®ããã¯ããŒã -likhogrud @ïŒã
2ïŒãªããžã§ã¯ããåå©çšãããªãçç±ã®èª¬æïŒ
å€ãã¯ãžã©ã§ã¯ãannotationViewsã¯ãã¥ãŒã§ããããŠãŒã¶ãŒã«ãã£ãŠäœæãããŸããããã¡ãããäœæã¯å®äŸ¡ã§ã¯ãªãããããã¥ãŒãåå©çšããå¿ èŠããããŸãã æ°ããã¯ãžã©ã§ã¯ããªãŒãã³GLã§çŽæ¥ããããããã«ãã£ãŠç®å°ãäœæãããŸãã ãããŠãããã§åå©çšããããããããŸããããããã¯äžæ£ç¢ºã§ãã ãããã«ãããããã¯ãã¥ãŒãäœæãããããã¯ããã«å¹ççã§ãã
3ïŒæ°ãããã®ããããšããã§ããŠãŒã¶ãŒã®æ³šéã¢ã€ã³ã³ãå€æŽããå¯èœæ§ããããŸãã 次ã®ããã«å®è£ ããŸãããªã¹ããŒïŒããªã²ãŒãã®ã¢ããã°ïŒãè¿œå ããé©åãªãããã³ã«ãå®è£ ããå¿ èŠããããŸã-3ã€ã®ã¡ãœããã®ãã¡1ã€ã2ã€ã ãã空ã®ãŸãŸã«ããŸãã
åæã«ãç®å°ãã¢ã€ã³ã³ã§åèªã¿èŸŒã¿ããŸãã
ãŸããã¢ã³ã«ãŒã®ããããã£ã«æ³šç®ããŸãã å°å³äžã®ãŠãŒã¶ãŒã®äœçœ®ãã¿ã³ãã¯ãªãã¯ãããšãã«ã¡ã©ã¯äœçœ®ã®äžå¿ã«ãã©ãŒã«ã¹ã移åããŸãã ããããåé¡ã¯ãããäžåºŠã¢ã¯ã·ã§ã³ãæŒããŠãçæãããªãããšã§ãã ãªã«ïŒ ã¢ã³ã«ãŒã¡ãœããã«ã€ããŠã³ã¡ã³ããããšããã¹ãŠãæ©èœããŸãã
4ïŒã¯ãªãã¯ã解決ããããã«ãããããã³ãŒã«ã¢ãŠãã衚瀺ããå¿ èŠããããŸãã ã€ã³ã¿ãŒãã§ãŒã¹ã«ã¯ããã€ãã®ã¡ãœããããããŸãããæ£ããã¡ãœããã¯YMKMapObjectTapListenerã§ãã åŸã§èªåèªèº«ãèŠãããªããã°ãªããªãã£ãéèŠãªèå³æ·±ãæ¹æ³ã1ã€ãããŸãããµãã¹ã¯ã©ã€ããèŠã€ãã£ãå Žåã«ããã«çµ±åããªãããã«trueãè¿ããŸãã ç§ã¯ããªãã®æ³šæãåŒããŸããããªãã¯æåã«ãµãã¹ã¯ã©ã€ãããå¿ èŠããããŸããmapObjectsã¯ãµãã¹ã¯ã©ã€ããããŸãïŒ149è¡ç®ïŒã
ãããã£ãŠãã¯ãªãã¯ã¯æºããããŸãã ãã£ã㌠ããã§ããå¯èŠãŸãŒã³ã«ã®ã¿ãã³ã衚瀺ããè©Šã¿ããããŸããããããã¯äžèŠã§ãããäžåºŠã«ãã¹ãŠã衚瀺ããããããã®ãŸãŸã«ããŠãããŸãïŒã¹ããŒããŠã³ããªãããïŒ
5ïŒãããããç§ã¯äŸ¿å©ã®ããã«ãã¿ã³ãæ¡å€§/çž®å°ããããã£ãã å Žæãã¿ã³ãšã®é¡æšã«ããå°ããªã³ããŒã¢ã³ãããŒã¹ããšç·šéããããŠå®äºã§ãã
ããã«ãã«ã¡ã©ã«ã€ããŠç¥ã£ãŠããã®ã§ãå¿ èŠã«å¿ããŠmoveã¡ãœããã䜿çšããããã«å¿ããŠçŸåšã®ãºãŒã +-1ãŸãã¯0.5ã䜿çšããŸãã ããã§ãã¹ãŠãé 調ã§ãã
6ïŒäž»ãªæ©èœ-ã³ãŒã«ã¢ãŠãïŒããã¯è¿œå æ å ±ã®ããé·æ¹åœ¢ã§ãäžéšã«äžè§åœ¢ããããŸãïŒãåç §ããŸãã APIããªãããšãããããŸããïŒãå€ã«ã¯é ãããã-ãã®èšäºãæåã§å ¥åããªãããã«ããªãŒãã¬ããããã¡ã¢ãèªãã ãšãã«Yandexãç§ã®ã¹ããŒããèªèããŸããïŒã
å æ°ã§ããïŒ 100 500ã¢ããªã±ãŒã·ã§ã³ã¯ã³ãŒã«ã¢ãŠãã䜿çšããŸãã
ç§ãã¡ã¯ãããã¯ãã«ã«ãµããŒããïŒKolyaïŒã§ãããæåã§è¡ãæ¹æ³ãããæžããŠããŸãã ããªãã®ãªãã·ã§ã³ã¯äœã§ããïŒ
ãããã®æŸèæã¯å¹³å°ã§æã«å ¥ããããããã§ãã
å®éãæŸèæã§ã¯ãªãããã¡ãããåºæ¬çãªæ©èœãèæ ®ããã ãã§äžåšã§ãã
7ïŒããŠãæåã«ãã¹ãã³ãŒã«ã¢ãŠããè¿œå ããŸããããèµ€ãæ£æ¹åœ¢ã䜿çšããŸãã ãã®ããããã³ãã¯ãªãã¯ãããšãããªã²ãŒã/ãªã¹ããŒã¡ãœãããåŒã³åºãããã¯ãªãã¯ãã€ã³ããšãªããžã§ã¯ããæž¡ãããŸãã ããªãã¯ãæåŸ ããããšãªããã³ãŒã«ã¢ãŠããè¿œå ãããã€ã³ããšããŠããã€ã³ããã䜿çšããŸãã ïŒæ³šæããã¹ãŠãæ£ããè¡ãããŸããïŒã圌ãã¯ã¯ãªãã¯ãããã€ã³ããåã£ãŠããããçžããŸãããïŒãçŽ80ïŒ ãæ£ããçãã20ïŒ ã¯ããã§ã¯ãããŸããã§ããïŒ
ãããŠãã¡ãœããæ¬äœã§showCalloutãã«ããŒã¡ãœãããåŒã³åºããŸãã
544è¡ç®
å éšã§ãèµ€è²ã®ãã¹ããã¥ãŒã40 x 40ã§äœæãããããç»åã«å€æããå€0.5ã®å®æ°xã宣èšããŸããããã¯ããã€ã³ãã®äžå€®ã«ã³ãŒã«ã¢ãŠãäžè§åœ¢ãé 眮ããããã«äœ¿çšãããŸãã 圌ã¯èªåã®äœçœ®ãå€ãããšããèããæåŠããåŸã§ã«ã¡ã©ãåãããŠãéžæãããã³ãŒã«ã¢ãŠããé»è©±ã¹ã¯ãªãŒã³ã®äžå€®ã«è¡šç€ºãããããã«ãã
次ã«ãtappableAreaã®ãããã·ã¥ããšãªã¢ã宣èšããŸãããã³ã®ã¢ã€ã³ã³ã¹ã¿ã€ã«ã«ã¯ãã®ãããªããããã£ããããŸãã ãŸããã¯ãªãã¯ãŸãŒã³ãå¶éããããšãã§ããŸãããããè¡ããŸãã ãŸãŒã³ã®ç¯å²ã¯0.0ã1.1ã§ãã äžã®éšåãå¿ èŠã§ããããã«ã¯ã以åã«ç»åã«å€æããããã¿ã³ããããšæãããŸãïŒèŠããŠãããŠãã ããïŒã ããŠããã¿ã³ãäžã«ãããããããã¯ãŸãŒã³ïŒ0,0.5-1.1ïŒãæå³ããŸãã
ãŸãŒã³å¶éã¯æ©èœããŸããããã¥ã¢ã³ã¹ãããããã¹ãŠãç¡å¹ã«ããŸãã æŒãããŠããªãé åã®äžã«å¥ã®ãã³ãããå ŽåãæŒããšæ©èœããŸãã ãã®ãšãªã¢ã®æå³ã¯ïŒ ã¯ãªãã¯ãééããªãããã«ããã©ã°ãªã©ãäœæããŸããã ããŠ...
550ã©ã€ã³
ã¢ã€ã³ã³ã®ã¹ã¿ã€ã«ãäœæãããšãæåã®ãã©ã¡ãŒã¿ãŒã§ã¢ã³ã«ãŒã®äœçœ®ãããã«æå®ã§ããŸããããšãã°ãäžã®557è¡ç®ã§ããã äœçœ®yã¯1.05ã«çãããäžè§åœ¢ããã³ã®äžã«åã³åçŽã«äžããŸã
559ã©ã€ã³
ç¹å®ã®ãµã€ãºã®ã«ã¹ã¿ã ã³ãŒã«ã¢ãŠããäœæãã
éžæãã泚éselectedAnnotationããã®æ å ±ãç¹ã«ã¿ã€ãã«ãšãµãã¿ã€ãã«ããã®ã³ãŒã«ã¢ãŠãã®ãã¿ã³ã®ç¢æã䜿çšããŠãå¿ èŠãªãã£ãŒã«ããæ§æããŸãã ãã®åŸãããªãèªèº«ãããªããããããããšãã§ããŸãã éžæãã泚éã¯ãããªã²ãŒãã§ä»¥åã«å®çŸ©ãããŠããŸãã ããããä»ã®ãšããã¯ã以åã«äœæããèµ€ãæ£æ¹åœ¢ãè¿œå ããŸã
次ã«ããã³ãmapObjectsã³ã¬ã¯ã·ã§ã³ã«è¿œå ããŸããã¡ãœããã¯è¿œå ãããç®å°ãè¿ããå€æ°ã«ä¿åããŸãã
ã³ãŒã«ã¢ãŠãèªäœãã¯ãªãã¯ãããšã詳现ãªã³ã³ãããŒã©ãŒãéãããããããã¢ããã®äžã«å¥ã®ãã³ãå ¥åãããããªã²ãŒããããã«å ¥ããšãããªã²ãŒããåã³æ©èœãããããããã§zIndexã䜿çšããŠéå±€å ã®é åºãå€æŽããå¿ èŠããããŸãã å¯èŠæ§ãèšå®ããã³ãŒã«ã¢ãŠãã564è¡ç®ã®äžå€®ã«ç§»åããŸã
ãã¥ã¢ã³ã¹ ïŒå€æ°ç®å°ã¯ãã³ãŒã«ã¢ãŠããžã®ãã€ã³ã¿ãŒã§ãã
æåã¯ãã³ããããŸããããã³ãã¯ãªãã¯ãããšè¡šç€ºãããŸãã次ã®ãã³ãã¯ãªãã¯ããåŸãæåã®ã³ãŒã«ã¢ãŠããåé€ããŠæ°ããã³ãŒã«ã¢ãŠããè¿œå ããå¿ èŠããããŸãã ãããã£ãŠãå€æ°placemarkïŒ= Nilã®å ŽåãmapObjectsã³ã¬ã¯ã·ã§ã³ããå€ãã³ãŒã«ã¢ãŠããåé€ããå¿ èŠããããŸãïŒ
ãŸããã«ãŒãã®ã¿ãã¹ã®å Žåãã³ãŒã«ã¢ãŠããé衚瀺ã«ããå¿ èŠããããããããªã²ãŒãã¡ãœããã§ç®å°ãå²ãåœãŠããªãã¶ãŒããŒãæ©èœããã³ãŒã«ã¢ãŠããåé€ãããéžæãã泚éãã¯ãªã¢ãããŸã
ãã®ããã以åã«YMKMapInputListenerã«ãµã€ã³ã¢ããããŸãã
ãã¥ãŒã®å®è¡æ¹æ³ã«ã€ããŠã¯èª¬æããŸããïŒããããã«å€ãã®åé¡ïŒå¯èœæ§ã®ããäžè§åœ¢ïŒãããå Žåã¯ããã®ã¹ããŒãžãè¿œå ããŸãã
äžã®äžè§åœ¢ã®äžã«ããå Žæã«ã¯ãé«ãã«è¿œå ãããéæ³20ãå¿ èŠã§ãã
ãŸããç¹å®ã®å ŽæïŒå·Šãå³ãäžå€®ïŒã®ãã³ã«ãããã¢ããããããã¢ããïŒã¢ã¿ããïŒããå¿ èŠããããŸããããã«ã¯ãã¢ã³ã«ãŒããããã£ããããŸãã 次ã®ããã«å®çŸ©ãããŸãïŒ
ãããã®å¯èŠé åã3ã€ã®åçŽãŸãŒã³ã«åå²ããã©ã®ãŸãŒã³ã«ããããå€æããããã«å¿ããŠãã€ã³ãã£ã³ã°ã®äœçœ®ãå€æŽããŸãã ã³ãŒãäŸã§ã¯ãå·ŠåŽã«ãããã©ããã確èªããŸããåæ§ã«ãäžå€®ã«ããå Žåãå·ŠåŽã«ãªãå Žåãšäžå€®ã«ãªãå Žåãå³åŽã®ãã€ã³ãã¯
ãã€ã³ããé åã«è©²åœãããã©ããã確èªãããã«ããŒé¢æ°ïŒ
ã¹ã¿ãŒãã åäœããŸãã ãããã埮åŠãªéãããããŸãããºãŒã ããããšããŠããããã§ãã1ã2ã3ããããŠã³ãŒã«ã¢ãŠãã¯ãã³ããé£ã³åºããŸãã ãªã«ïŒ ã©ããã£ãŠïŒ
7ïŒãããã°ãéå§ããŸãã座æšã¯åãã§ã
ãã®åŸãäœãèµ·ãã£ãŠããã®ããã©ã®ããã«æ©èœããã®ããç解ããããšè©Šã¿ããã¢ã«æ»ããããã«æ³šææ·±ãéãã®æ€çŽ¢ãè¡ããŸãã...
ç§ã¯ã座æšãçŽæ¥éä¿¡ãããtapuã®ãã®ã§ã¯ãªãããšã«æ°ä»ããŸããïŒ ããããçµå±ã®ãšãããç§ã¯ã座æšãåãã§ããããšãã€ãŸããåãšæ£æ¹åœ¢ã®åº§æšãåãã§ããããšã¯æããã§ãã
ãã®ãããã¡ãœããã§ã¯ãªããžã§ã¯ãã«ããã«ã¢ã¯ã»ã¹ããããã€ã³ããæž¡ããŸããããããã¯æ£ãããããŸããã
ãããããªããžã§ã¯ãããã£ã¹ãããããããã£ãååŸããå¿ èŠããããŸãïŒãã¹ãŠãç°ãªãæ¹æ³ã§åŒã³åºããããã¹ãŠã®å Žæã§ãããã§çŸåšã®ãžãªã¡ããªã調æŽããŠãããã€ã³ãããïŒã¯ããã®çš®ã®ã¯ãªãšã€ãã£ããªã®ã§ããïŒ 493è¡
åããã³ãç¹°ãè¿ãã¯ãªãã¯ããå Žåãæåã®ãã³çãã2çªç®ã®ã³ãŒã«ã¢ãŠããããã³ã¯ãªãã¯ãåŠçããªããšãã2ã€ã®æŒããªãã·ã§ã³ãåŠçããå¿ èŠãããããã æåã«è¡ãããšã¯ããã³ã³ã¬ã¯ã·ã§ã³ã§ã¯ãªãã¯ãããã³ãèŠã€ããããšã§ã495è¡ã調æŽããŸãããã以å€ã®å Žåã¯trueãè¿ããŸããããã«ãããã¯ãªãã¯ãåŠçããéå±€ãããã«é²ããå¿ èŠããªããšèšããŸãã
次㫠ããã³ãŸãã¯ã³ãŒã«ã¢ãŠããã¯ãªãã¯ããŠã499è¡ã©ãã«ã®åº§æšãæ¯èŒããŸãã åçæ§ãã¹ãïŒ
ããã«ããããã³ãŒã«ã¢ãŠãã§ãããé åå šäœã§ã¯ãªããã¿ã³ã¯ãªãã¯ã«å¿çããïŒãŸãã¯ãçŸåšã¯ç»åã§ããããã«æš¡å£ããïŒå Žåã¯ããã³ã§ããã€ãã®èšç®ãè¡ãå¿ èŠããããŸã:)
- äžç座æšãç»é¢501è¡ã«å€æãã
ç§ãã¡ã¯èªåèªèº«ãèæ ®ããŸãïŒããã座æšãç»é¢äžã«å€æããçŸåšäœçœ®ã確èªãããã¥ãŒã®å¹ ãšé«ããè¿œå ããããšã§ã³ãŒããŒãã€ã³ããååŸããŸãããäœããã®çç±ã§ããããäžèŽãããæåã§3åããŸãïŒç§ã®å Žåã¯10çªç®ã®iPhoneïŒïŒã åŸã§å€æããããã«ãç§ã¯å¿ããŠããããã€ã³ããããã®ãã¯ã»ã«æ°ãèæ ®ããŸããã§ããã 1xïŒ1ãã€ã³ã1ãã¯ã»ã«ïŒã2xã3x 1ãã€ã³ãã¯3ãã¯ã»ã«ã§ãã - ãã¿ã³ã®é«ã-ã³ãŒã«ã¢ãŠãã®é«ã+äžè§åœ¢ã®é«ããã¹ã±ãŒã«ãã¹ã±ãŒã«ã«é¢ããæ å ±ïŒè¡498ïŒãèšç®ããŸãã 次ã«ããã¿ã³ã®é«ããã³ãŒã«ã¢ãŠãã®é«ãã®ååã§ãããããããããã¹ãŠ2ã€ã«åå²ããŸãã
- 次ã«ãã¢ã³ã«ãŒïŒxïŒ0.5ãyïŒ1ïŒã«åºã¥ããŠãè§åºŠã®åº§æšãèšç®ããŸããäžè§åœ¢ã®ã¹ã±ãŒã«ãšé¢ç©ãäžããããŸãïŒïŒ
- 次ã«ããããã®ç»é¢åº§æšãäžçã«å€æããŸã
- ãããã«åºã¥ããŠè¡šç€ºé åãäœæããŸãããã¿ã³ãŸãŒã³ã§ã
- ãããŠããã¿ã³ãŸãŒã³ã«ããããããã©ããã確èªããŸãã ããããããã泚éã®ã¿ã€ãã確èªããã¿ã€ãã«å¿ããŠãããã€ãã®ã¡ãœãããåŒã³åºããŸãã詳现ç»é¢ã«ç§»åããããStorePointã䜿çšããå Žåã®é ä¿¡çšã«ãã®ã¹ãã¢ãéžæããŸã
ãã以å€ã®å Žåã¯ããã³ãã¯ãªãã¯ããã ãã§ãå®éã«äžèšã§è¡ã£ãã³ãŒã«ã¢ãŠããè¿œå ããå¿ èŠããããŸãã
以äžã§ãæ°ããã¯ãžã©ãšã®æåã®ç¥ãåãã¯çµãããŸããã
远䌞 ç§ãèšäºãæžãå§ãããšããäžèšã®åé¡ã解決ããå®è£ ãããã¢ããããŒã3.1ãçºè¡šãããŸããã
è¿œå ããŸãã
Androidã®å Žåãarm64ããã³x86ãã«ããç»å ŽããŸããã
ä»»æã®Viewãªããžã§ã¯ãããããã«è¿œå ã§ããŸãã
èªè»¢è»ã«ãŒãã£ã³ã°ãç»å ŽããŸããã
Androidã«nullableã¢ãããŒã·ã§ã³ãè¿œå ããŸããã
å€æŽããã
MapKitã¯ããã€ãã®éšåã«åãããŠããŸãã
MapKit-ãããã®ã¿ã
MapKitã«ãŒã-è»ã®ã«ãŒãã£ã³ã°;
MapKit Transport-æ©è¡è ã«ãŒããå ¬å ±äº€éã«ãŒããèªè»¢è»ã«ãŒãã
MapKit Search-æ€çŽ¢ãšãžãªã³ãŒãã£ã³ã°ã
MapKit Places-ããã©ãã
iOSã®å Žåãnullå¯èœæ³šéã¯ããå³æ Œã«ãªããŸããã
ä¿®æ£æžã¿
å€ãã®ãã°ãä¿®æ£ãããŸããã
ããã©ãŒãã³ã¹ã®æ¹åã
tech.yandex.ru/maps/doc/mapkit/3.x/concepts/versions-docpage
ã³ã¡ã³ãã質åãæžããŠãã ããã