react-native-webview-leaflet-without-expo-fix
v4.1.22
Published
A React Native component that uses a React Native WebView to provide a Leaflet map.
Downloads
2
Maintainers
Readme
��#� �R�e�a�c�t� �N�a�t�i�v�e� �W�e�b�v�i�e�w� �L�e�a�f�l�e�t�
�
�
�
�#�#� �A� �L�e�a�f�l�e�t� �m�a�p� �c�o�m�p�o�n�e�n�t� �w�i�t�h� �n�o� �n�a�t�i�v�e� �c�o�d�e� �f�o�r� �R�e�a�c�t� �N�a�t�i�v�e� �a�p�p�l�i�c�a�t�i�o�n�s�
�
�
�
�#�#�#� ��&� �T�h�i�s� �i�s� �v�e�r�s�i�o�n� �4� �o�f� �t�h�i�s� �l�i�b�r�a�r�y�.� �I�t� �i�n�c�l�u�d�e�s� �b�r�e�a�k�i�n�g� �c�h�a�n�g�e�s� �f�r�o�m� �p�r�e�v�i�o�u�s� �v�e�r�s�i�o�n�s�.�
�
�
�
�#�#�#�#� �D�i�f�f�e�r�e�n�c�e� �B�e�t�w�e�e�n� �V�e�r�s�i�o�n�s�
�
�
�
�L�i�k�e� �v�e�r�s�i�o�n� �2�,� �v�e�r�s�i�o�n� �3� �b�u�i�l�d�s� �o�n� �[�r�e�a�c�t�-�l�e�a�f�l�e�t�]�(�h�t�t�p�s�:�/�/�g�i�t�h�u�b�.�c�o�m�/�P�a�u�l�L�e�C�a�m�/�r�e�a�c�t�-�l�e�a�f�l�e�t�)�.� �T�h�e� �p�r�i�m�a�r�y� �n�e�w� �f�e�a�t�u�r�e� �i�s� �t�h�e� �a�b�i�l�i�t�y� �t�o� �s�p�e�c�i�f�y� �m�a�p� �t�i�l�e�s�.� �S�e�e� �b�e�l�o�w� �f�o�r� �m�o�r�e� �d�e�t�a�i�l�s�.�
�
�
�
�#�#�#� �W�h�y� �U�s�e� �T�h�i�s� �L�i�b�r�a�r�y�
�
�
�
�T�h�i�s� �c�o�m�p�o�n�e�n�t� �i�s� �u�s�e�f�u�l� �i�f� �y�o�u� �w�a�n�t� �t�o� �d�i�s�p�l�a�y� �H�T�M�L� �e�l�e�m�e�n�t�s� �o�n� �a�n� �i�n�t�e�r�a�c�t�i�v�e� �m�a�p�.� �S�i�n�c�e� �t�h�e� �e�l�e�m�e�n�t�s� �a�r�e� �j�u�s�t� �H�T�M�L� �i�t�e�m�s�,� �y�o�u� �c�a�n� �u�s�e� �S�V�G�'�s�,� �e�m�o�j�i�s�,� �t�e�x�t�,� �i�m�a�g�e�s�,� �e�t�c�.�,� �a�n�d� �t�h�e�y� �c�a�n� �e�v�e�n� �b�e� �a�n�i�m�a�t�e�d�,� �u�p�d�a�t�e�d�,� �a�n�d� �c�h�a�n�g�e�d� �a�s� �r�e�q�u�i�r�e�d�.�
�
�
�
�#�#�#� �W�h�y� �N�o�t� �U�s�e� �T�h�i�s� �L�i�b�r�a�r�y�
�
�
�
�Y�o�u� �m�a�y� �k�n�o�w� �w�a�n�t� �t�o� �u�s�e� �t�h�i�s� �l�i�b�r�a�r�y� �i�f� �y�o�u�'�d� �r�a�t�h�e�r� �u�s�e� �G�o�o�g�l�e� �m�a�p� �t�i�l�e�s� �a�n�d� �d�a�t�a� �v�i�c�e� �t�h�e� �t�i�l�e�s� �a�n�d� �m�a�p� �d�a�t�a� �f�r�o�m� �O�p�e�n� �S�t�r�e�e�t� �M�a�p�s�.�
�
�
�
�[�!�[�n�p�m�]�(�h�t�t�p�s�:�/�/�i�m�g�.�s�h�i�e�l�d�s�.�i�o�/�n�p�m�/�v�/�r�e�a�c�t�-�n�a�t�i�v�e�-�w�e�b�v�i�e�w�-�l�e�a�f�l�e�t�.�s�v�g�)�]�(�h�t�t�p�s�:�/�/�w�w�w�.�n�p�m�j�s�.�c�o�m�/�p�a�c�k�a�g�e�/�r�e�a�c�t�-�n�a�t�i�v�e�-�w�e�b�v�i�e�w�-�l�e�a�f�l�e�t�)�
�
�[�!�[�n�p�m�]�(�h�t�t�p�s�:�/�/�i�m�g�.�s�h�i�e�l�d�s�.�i�o�/�n�p�m�/�d�m�/�r�e�a�c�t�-�n�a�t�i�v�e�-�w�e�b�v�i�e�w�-�l�e�a�f�l�e�t�.�s�v�g�)�]�(�h�t�t�p�s�:�/�/�w�w�w�.�n�p�m�j�s�.�c�o�m�/�p�a�c�k�a�g�e�/�r�e�a�c�t�-�n�a�t�i�v�e�-�w�e�b�v�i�e�w�-�l�e�a�f�l�e�t�)�
�
�[�!�[�n�p�m�]�(�h�t�t�p�s�:�/�/�i�m�g�.�s�h�i�e�l�d�s�.�i�o�/�n�p�m�/�d�t�/�r�e�a�c�t�-�n�a�t�i�v�e�-�w�e�b�v�i�e�w�-�l�e�a�f�l�e�t�.�s�v�g�)�]�(�h�t�t�p�s�:�/�/�w�w�w�.�n�p�m�j�s�.�c�o�m�/�p�a�c�k�a�g�e�/�r�e�a�c�t�-�n�a�t�i�v�e�-�w�e�b�v�i�e�w�-�l�e�a�f�l�e�t�)�
�
�[�!�[�n�p�m�]�(�h�t�t�p�s�:�/�/�i�m�g�.�s�h�i�e�l�d�s�.�i�o�/�n�p�m�/�l�/�r�e�a�c�t�-�n�a�t�i�v�e�-�w�e�b�v�i�e�w�-�l�e�a�f�l�e�t�.�s�v�g�)�]�(�h�t�t�p�s�:�/�/�g�i�t�h�u�b�.�c�o�m�/�r�e�a�c�t�-�n�a�t�i�v�e�-�c�o�m�p�o�n�e�n�t�/�r�e�a�c�t�-�n�a�t�i�v�e�-�w�e�b�v�i�e�w�-�l�e�a�f�l�e�t�/�b�l�o�b�/�m�a�s�t�e�r�/�L�I�C�E�N�S�E�)�
�
�
�
�!�[�I�m�a�g�e�]�(�h�t�t�p�s�:�/�/�t�h�u�m�b�s�.�g�f�y�c�a�t�.�c�o�m�/�N�a�u�g�h�t�y�C�a�n�i�n�e�A�m�e�r�i�c�a�n�l�o�b�s�t�e�r�-�s�i�z�e�_�r�e�s�t�r�i�c�t�e�d�.�g�i�f�)�
�
�
�
�#�#� �I�n�s�t�a�l�l�a�t�i�o�n�
�
�
�
�I�n�s�t�a�l�l� �u�s�i�n�g� �n�p�m� �o�r� �y�a�r�n� �l�i�k�e� �t�h�i�s�:�
�
�
�
��
��j�a�v�a�s�c�r�i�p�t�
�
�n�p�m� �i�n�s�t�a�l�l� �-�-�s�a�v�e� �r�e�a�c�t�-�n�a�t�i�v�e�-�w�e�b�v�i�e�w�-�l�e�a�f�l�e�t�
�
�
��
�
�
�
�
�o�r�
�
�
�
��
��j�a�v�a�s�c�r�i�p�t�
�
�y�a�r�n� �a�d�d� �r�e�a�c�t�-�n�a�t�i�v�e�-�w�e�b�v�i�e�w�-�l�e�a�f�l�e�t�
�
�
��
�
�
�
�
�#�#� �U�s�a�g�e�
�
�
�
�a�n�d� �i�m�p�o�r�t� �l�i�k�e� �s�o�
�
�
�
��
��j�a�v�a�s�c�r�i�p�t�
�
�i�m�p�o�r�t� �W�e�b�V�i�e�w�L�e�a�f�l�e�t� �f�r�o�m� �"�r�e�a�c�t�-�n�a�t�i�v�e�-�w�e�b�v�i�e�w�-�l�e�a�f�l�e�t�"�;�
�
�
��
�
�
�
�
�A� �t�y�p�i�c�a�l� �e�x�a�m�p�l�e� �i�s� �s�h�o�w�n� �b�e�l�o�w�:�
�
�
�
��
��j�a�v�a�s�c�r�i�p�t�
�
�<�W�e�b�V�i�e�w�L�e�a�f�l�e�t�
�
� � �r�e�f�=�{�c�o�m�p�o�n�e�n�t� �=�>� �(�t�h�i�s�.�w�e�b�V�i�e�w�L�e�a�f�l�e�t� �=� �c�o�m�p�o�n�e�n�t�)�}�
�
� � �/�/� �O�p�t�i�o�n�a�l�:� �a� �c�a�l�l�b�a�c�k� �t�h�a�t� �w�i�l�l� �b�e� �c�a�l�l�e�d� �w�h�e�n� �t�h�e� �m�a�p� �i�s� �l�o�a�d�e�d�
�
� � �o�n�L�o�a�d�=�{�t�h�i�s�.�o�n�L�o�a�d�}�
�
�
�
� � �/�/� �O�p�t�i�o�n�a�l�:� �t�h�e� �c�o�m�p�o�n�e�n�t� �t�h�a�t� �w�i�l�l� �r�e�c�e�i�v�e� �m�a�p� �e�v�e�n�t�s�}�
�
� � �e�v�e�n�t�R�e�c�e�i�v�e�r�=�{�t�h�i�s�}� �
�
�
�
� � �/�/� �O�p�t�i�o�n�a�l�:� �t�h�e� �c�e�n�t�e�r� �o�f� �t�h�e� �d�i�s�p�l�a�y�e�d� �m�a�p�
�
� � �c�e�n�t�e�r�P�o�s�i�t�i�o�n�=�{�t�h�i�s�.�s�t�a�t�e�.�m�a�p�C�e�n�t�e�r�P�o�s�i�t�i�o�n�}�
�
�
�
� � �/�/� �O�p�t�i�o�n�a�l�:� �a� �l�i�s�t� �o�f� �m�a�r�k�e�r�s� �t�h�a�t� �w�i�l�l� �b�e� �d�i�s�p�l�a�y�e�d� �o�n� �t�h�e� �m�a�p�
�
� � �m�a�r�k�e�r�s�=�{�t�h�i�s�.�s�t�a�t�e�.�m�a�r�k�e�r�s�}�
�
�
�
� � �/�/� �R�e�q�u�i�r�e�d�:� �t�h�e� �m�a�p� �l�a�y�e�r�s� �t�h�a�t� �w�i�l�l� �b�e� �d�i�s�p�l�a�y�e�d� �o�n� �t�h�e� �m�a�p�.� �S�e�e� �b�e�l�o�w� �f�o�r� �a� �d�e�s�c�r�i�p�t�i�o�n� �o�f� �t�h�e� �m�a�p� �l�a�y�e�r�s� �o�b�j�e�c�t�
�
� � �m�a�p�L�a�y�e�r�s�=�{�m�a�p�L�a�y�e�r�s�}�
�
�
�
� � �/�/� �O�p�t�i�o�n�a�l�:� �d�i�s�p�l�a�y� �a� �m�a�r�k�e�r� �t�o� �b�e� �a�t� �a� �g�i�v�e�n� �l�o�c�a�t�i�o�n�
�
� � �o�w�n�P�o�s�i�t�i�o�n�M�a�r�k�e�r�=�{�{�
�
� � � � �c�o�o�r�d�s�:� �t�h�i�s�.�s�t�a�t�e�.�c�u�r�r�e�n�t�L�o�c�a�t�i�o�n�,�
�
� � � � �i�c�o�n�:� �"�d'�"�,�
�
� � � � �s�i�z�e�:� �[�2�4�,� �2�4�]�,�
�
� � � � �a�n�i�m�a�t�i�o�n�:� �{�
�
� � � � � � �n�a�m�e�:� �"�p�u�l�s�e�"�,�
�
� � � � � � �d�u�r�a�t�i�o�n�:� �"�.�5�"�,�
�
� � � � � � �d�e�l�a�y�:� �0�,�
�
� � � � � � �i�n�t�e�r�a�t�i�o�n�C�o�u�n�t�:� �"�i�n�f�i�n�i�t�e�"�
�
� � � � �}�
�
� � �}�}�
�
�
�
� � �/�/� �O�p�t�i�o�n�a�l� �(�d�e�f�a�u�l�t�s� �t�o� �f�a�l�s�e�)�:� �d�i�s�p�l�a�y� �a� �b�u�t�t�o�n� �t�h�a�t� �c�e�n�t�e�r�s� �t�h�e� �m�a�p� �o�n� �t�h�e� �c�o�o�r�d�i�n�a�t�e�s� �o�f� �o�w�n�P�o�s�t�i�o�n�M�a�r�k�e�r�.� �R�e�q�u�i�r�e�s� �t�h�a�t� �"�o�w�n�P�o�s�i�t�i�o�n�M�a�r�k�e�r�"� �p�r�o�p� �b�e� �s�e�t�
�
� � �c�e�n�t�e�r�B�u�t�t�o�n�=�{�t�r�u�e�}�
�
�
�
� � �/�/� �O�p�t�i�o�n�a�l� �(�d�e�f�a�u�l�t�s� �t�o� �f�a�l�s�e�)�:� �c�l�u�s�t�e�r� �i�c�o�n�s� �t�h�a�t� �a�r�e� �i�n� �t�h�e� �s�a�m�e� �a�r�e�a�
�
� � �u�s�e�M�a�r�k�e�r�C�l�u�s�t�e�r�i�n�g�=�{�t�r�u�e�}�
�
�/�>�
�
�
��
�
�
�
�
�A�f�t�e�r� �l�o�a�d�i�n�g�,� �t�h�e� �m�a�p� �e�x�p�e�c�t�s� �t�o� �r�e�c�e�i�v�e� �a�n� �a�r�r�a�y� �o�f� �m�a�p� �l�a�y�e�r� �i�n�f�o�r�m�a�t�i�o�n� �o�b�j�e�c�t�s�.� �A� �s�a�m�p�l�e� �o�b�j�e�c�t� �s�h�o�w�i�n�g� �a� �[�M�a�p�B�o�x�]�(�h�t�t�p�s�:�/�/�w�w�w�.�m�a�p�b�o�x�.�c�o�m�/�)� �t�i�l�e� �l�a�y�e�r� �i�s� �s�h�o�w�n� �b�e�l�o�w�.�
�
�
�
��
��j�a�v�a�s�c�r�i�p�t�
�
� � �{�
�
� � � � �n�a�m�e�:� �'�s�t�r�e�e�t�s�'�,� � �/�/� �t�h�e� �n�a�m�e� �o�f� �t�h�e� �l�a�y�e�r�,� �t�h�i�s� �w�i�l�l� �b�e� �s�e�e�n� �i�n� �t�h�e� �l�a�y�e�r� �s�e�l�e�c�t�i�o�n� �c�o�n�t�r�o�l�
�
� � � � �c�h�e�c�k�e�d�:� �'�t�r�u�e�'�,� � �/�/� �i�f� �t�h�e� �l�a�y�e�r� �i�s� �s�e�l�e�c�t�e�d� �i�n� �t�h�e� �l�a�y�e�r� �s�e�l�e�c�t�i�o�n� �c�o�n�t�r�o�l�
�
� � � � �t�y�p�e�:� �'�T�i�l�e�L�a�y�e�r�'�,� � �/�/� �t�h�e� �t�y�p�e� �o�f� �l�a�y�e�r� �a�s� �s�h�o�w�n� �a�t� �h�t�t�p�s�:�/�/�r�e�a�c�t�-�l�e�a�f�l�e�t�.�j�s�.�o�r�g�/�d�o�c�s�/�e�n�/�c�o�m�p�o�n�e�n�t�s�.�h�t�m�l�#�r�a�s�t�e�r�-�l�a�y�e�r�s�
�
� � � � �b�a�s�e�L�a�y�e�r�:� �t�r�u�e�,�
�
� � � � �/�/� �u�r�l� �o�f� �t�i�l�e�s�
�
� � � � �u�r�l�:� �
�h�t�t�p�s�:�/�/�a�p�i�.�t�i�l�e�s�.�m�a�p�b�o�x�.�c�o�m�/�v�4�/�m�a�p�b�o�x�.�s�t�r�e�e�t�s�/�{�z�}�/�{�x�}�/�{�y�}�.�p�n�g�?�a�c�c�e�s�s�_�t�o�k�e�n�=�$�{�m�a�p�b�o�x�T�o�k�e�n�}��,�
�
� � � � �/�/� �a�t�t�r�i�b�u�t�i�o�n� �s�t�r�i�n�g� �t�o� �b�e� �s�h�o�w�n� �f�o�r� �t�h�i�s� �l�a�y�e�r�
�
� � � � �a�t�t�r�i�b�u�t�i�o�n�:�
�
� � � � � � �'�&�a�m�p�;�c�o�p�y� �<�a� �h�r�e�f�=�&�q�u�o�t�;�h�t�t�p�:�/�/�o�s�m�.�o�r�g�/�c�o�p�y�r�i�g�h�t�&�q�u�o�t�;�>�O�p�e�n�S�t�r�e�e�t�M�a�p�<�/�a�>� �c�o�n�t�r�i�b�u�t�o�r�s�'�
�
� � �}�
�
�
��
�
�
�
�
�T�h�e� �f�o�r�m�a�t� �o�f� �t�h�e� �o�b�j�e�c�t� �d�e�p�e�n�d�s� �o�n� �t�h�e� �t�y�p�e� �o�f� �l�a�y�e�r� �t�o� �b�e� �d�i�s�p�l�a�y�e�d�,� �a�n�d� �c�o�r�r�e�s�p�o�n�d�s� �t�o� �t�h�e� �R�a�s�t�e�r� �L�a�y�e�r�s� �i�n� �r�e�a�c�t�-�l�e�a�f�l�e�t� � �
�
�h�t�t�p�s�:�/�/�r�e�a�c�t�-�l�e�a�f�l�e�t�.�j�s�.�o�r�g�/�d�o�c�s�/�e�n�/�c�o�m�p�o�n�e�n�t�s�.�h�t�m�l�#�r�a�s�t�e�r�-�l�a�y�e�r�s�
�
�
�
���N�O�T�E�:� �I�m�a�g�e� �a�n�d� �V�i�d�e�o�O�v�e�r�l�a�y� �l�a�y�e�r�s� �d�o� �n�o�t� �c�u�r�r�e�n�t�l�y� �w�o�r�k�.���
�
�
�
�E�x�a�m�p�l�e� �o�b�j�e�c�t�s� �a�r�e� �s�h�o�w�n� �i�n� �t�h�e� �m�o�c�k�M�a�p�L�a�y�e�r�s�.�j�s� �f�i�l�e� �i�n� �t�h�i�s� �r�e�p�o�s�i�t�o�r�y�.�
�
�
�
�#�#�#� �C�o�m�m�u�n�i�c�a�t�i�n�g� �w�i�t�h� �t�h�e� �m�a�p�
�
�
�
�#�#�#�#� �L�i�s�t�e�n�i�n�g� �f�o�r� �E�v�e�n�t�s�
�
�
�
�T�h�i�s� �l�i�b�r�a�r�y� �s�u�p�p�o�r�t�s� �m�a�p� �c�l�i�c�k�e�d�,� �m�a�p� �m�a�r�k�e�r� �c�l�i�c�k�e�d�,� �a�n�d� �t�h�e� �m�a�p� �e�v�e�n�t�s� �t�h�a�t� �a�r�e� �e�x�p�o�s�e�d� �b�y� �L�e�a�f�l�e�t�.�
�
�
�
�#�#�#�#�#� �M�a�p� �C�l�i�c�k�e�d� �a�n�d� �M�a�p� �M�a�r�k�e�r� �C�l�i�c�k�e�d� �E�v�e�n�t�s�
�
�
�
�T�o� �r�e�c�e�i�v�e� �m�a�p� �c�l�i�c�k�e�d� �a�n�d� �o�n� �m�a�p� �m�a�r�k�e�r� �c�l�i�c�k�e�d� �e�v�e�n�t�s�,� �a�d�d� �t�h�e� �f�o�l�l�o�w�i�n�g� �f�u�n�c�t�i�o�n�s� �t�o� �t�h�e� �c�o�m�p�o�n�e�n�t� �i�d�e�n�t�i�f�i�e�d� �b�y� �t�h�e� �e�v�e�n�t�R�e�c�e�i�v�e�r� �p�r�o�p�.�
�
�
�
��
��j�a�v�a�s�c�r�i�p�t�
�
�o�n�M�a�p�C�l�i�c�k�e�d� �=� �(�{� �p�a�y�l�o�a�d� �}�)� �=�>� �{�
�
� � �c�o�n�s�o�l�e�.�l�o�g�(�
�M�a�p� �C�l�i�c�k�e�d�:� �a�p�p� �r�e�c�e�i�v�e�d�:� �$�{�p�a�y�l�o�a�d�.�c�o�o�r�d�s�}��)�;�
�
� � �t�h�i�s�.�s�h�o�w�A�l�e�r�t�(�"�M�a�p� �C�l�i�c�k�e�d�"�,� �
�C�o�o�r�d�i�n�a�t�e�s� �=� �$�{�p�a�y�l�o�a�d�.�c�o�o�r�d�s�}��)�;�
�
�}�;�
�
�
�
�o�n�M�a�p�M�a�r�k�e�r�C�l�i�c�k�e�d� �=� �(�{� �p�a�y�l�o�a�d� �}�)� �=�>� �{�
�
� � �c�o�n�s�o�l�e�.�l�o�g�(�
�M�a�r�k�e�r� �C�l�i�c�k�e�d�:� �$�{�p�a�y�l�o�a�d�.�i�d�}��)�;�
�
� � �t�h�i�s�.�s�h�o�w�A�l�e�r�t�(�"�M�a�r�k�e�r� �C�l�i�c�k�e�d�"�,� �
�M�a�r�k�e�r� �I�D� �=� �$�{�p�a�y�l�o�a�d�.�i�d�}��)�;�
�
�}�;�
�
�
��
�
�
�
�
�#�#�#�#�#� �L�e�a�f�l�e�t� �M�a�p� �E�v�e�n�t�s�
�
�
�
�T�o� �r�e�a�c�t� �t�o� �l�e�a�f�l�e�t� �m�a�p� �e�v�e�n�t�s�,� �y�o�u� �n�e�e�d� �t�o� �c�r�e�a�t�e� �f�u�n�c�t�i�o�n�s� �i�n� �y�o�u�r� �c�o�m�p�o�n�e�n�t� �t�o� �h�a�n�d�l�e� �t�h�e�m�.� �T�h�e�s�e� �f�u�n�c�t�i�o�n�s�'� �n�a�m�e�s� �m�u�s�t� �b�e� �c�a�m�e�l�C�a�s�e�d� �a�n�d� �p�r�e�f�i�x�e�d� �b�y� �'�o�n�'�.�
�
�F�o�r� �e�x�a�m�p�l�e�,� �t�o� �l�i�s�t�e�n� �f�o�r� �L�e�a�f�l�e�t�'�s� ��z�o�o�m�l�e�v�e�l�s�c�h�a�n�g�e�
� �e�v�e�n�t�,� �y�o�u� �w�i�l�l� �n�e�e�d� �t�o� �c�r�e�a�t�e� �a� �f�u�n�c�t�i�o�n�
�
�c�a�l�l�e�d� ��o�n�Z�o�o�m�L�e�v�e�l�s�C�h�a�n�g�e�
�.� �T�h�e�s�e� �f�u�n�c�t�i�o�n�s� �w�i�l�l� �r�e�c�e�i�v�e� �t�h�e� �f�o�l�l�o�w�i�n�g� �o�b�j�e�c�t�
�
�
�
��
��j�a�v�a�s�c�r�i�p�t�
�
�{�
�
� � �c�e�n�t�e�r�,� �/�/� �c�e�n�t�e�r� �o�f� �t�h�e� �m�a�p�
�
� � � � �b�o�u�n�d�s�,� �/�/� �t�h�e� �b�o�u�n�d�s� �o�f� �t�h�e� �m�a�p�
�
� � � � �z�o�o�m�;� �/�/� �t�h�e� �z�o�o�m� �l�e�v�e�l� �o�f� �t�h�e� �m�a�p�
�
�}�
�
�
��
�
�
�
�
�#�#�#� �S�e�n�d�i�n�g� �E�v�e�n�t�s� �t�o� �t�h�e� �M�a�p�
�
�
�
�T�h�e� �m�a�p� �c�a�n� �b�e� �b�e� �u�p�d�a�t�e�d� �b�y� �s�e�n�d�i�n�g� �m�e�s�s�a�g�e�s� �f�r�o�m� �y�o�u�r� �c�o�m�p�o�n�e�n�t� �t�o� �t�h�e� �W�e�b�V�i�e�w�L�e�a�f�l�e�t� �c�o�m�p�o�n�e�n�t� �v�i�a� �i�t�s� �r�e�f�e�r�e�n�c�e� �l�i�k�e� �s�o�:�
�
�
�
��
��j�a�v�a�s�c�r�i�p�t�
�
�t�h�i�s�.�w�e�b�V�i�e�w�L�e�a�f�l�e�t�.�s�e�n�d�M�e�s�s�a�g�e�(�{�
�
� � �z�o�o�m�:� �6�,�
�
� � �l�o�c�a�t�i�o�n�s�:� �t�h�i�s�.�s�t�a�t�e�.�l�o�c�a�t�i�o�n�s�,� �/�/� �a�n� �a�r�r�a�y� �o�f� �l�o�c�a�t�i�o�n�s�
�
� � �s�h�o�w�A�t�t�r�i�b�u�t�i�o�n�C�o�n�t�r�o�l�:� �t�h�i�s�.�s�t�a�t�e�.�m�a�p�S�t�a�t�e�.�s�h�o�w�A�t�t�r�i�b�u�t�i�o�n�C�o�n�t�r�o�l�,� �/�/� �a� �b�o�o�l�e�a�n� �c�o�n�t�r�o�l�l�i�n�g� �w�h�e�t�h�e�r� �t�h�e� �m�a�p� �d�i�s�p�l�a�y�s� �i�t�s� �a�t�t�r�i�b�u�t�i�o�n� �c�o�n�t�r�o�l�
�
� � �s�h�o�w�Z�o�o�m�C�o�n�t�r�o�l�:� �t�h�i�s�.�s�t�a�t�e�.�m�a�p�S�t�a�t�e�.�s�h�o�w�Z�o�o�m�C�o�n�t�r�o�l� �/�/� �a� �b�o�o�l�e�a�n� �c�o�n�t�r�o�l�l�i�n�g� �w�h�e�t�h�e�r� �t�h�e� �m�a�p� �d�i�s�p�l�a�y�s� �i�t�s� �z�o�o�m� �c�o�n�t�r�o�l�
�
�}�)�;�
�
�
��
�
�
�
�
�A� �[�r�e�a�c�t�-�l�e�a�f�l�e�t�]�(�h�t�t�p�s�:�/�/�r�e�a�c�t�-�l�e�a�f�l�e�t�.�j�s�.�o�r�g�/�e�n�/�)� �c�o�m�p�o�n�e�n�t� �m�a�k�e�s� �u�p� �t�h�e� �m�a�p� �t�h�a�t� �i�s� �r�e�n�d�e�r�e�d� �b�y� ��W�e�b�V�i�e�w�L�e�a�f�l�e�t�
�.� �T�h�i�s� �a�l�l�o�w�s� �m�e�s�s�a�g�e�s� �l�i�k�e� �t�h�e� �o�n�e� �a�b�o�v�e� �t�o� �b�e� �u�s�e�d� �t�o� �d�i�r�e�c�t�l�y� �s�e�t� �v�a�l�u�e�s� �i�n� �t�h�e� �m�a�p�'�s� �s�t�a�t�e�.�
�
�
�
�#�#�#� �C�r�e�a�t�i�n�g� �M�a�p� �M�a�r�k�e�r�s�
�
�
�
�T�h�e� �m�a�p� �b�u�i�l�d�s� �a�n�d� �d�i�s�p�l�a�y�s� �i�t�s� �m�a�r�k�e�r�s� �b�a�s�e�d� �o�n� �t�h�e� �v�a�l�u�e� �o�f� �t�h�e� ��l�o�c�a�t�i�o�n�s�
� �k�e�y� �i�n� �i�t�s� �o�w�n� �s�t�a�t�e�.� �Y�o�u� �c�a�n� �u�p�d�a�t�e� �t�h�e� �v�a�l�u�e� �o�f� �i�t�'�s� ��l�o�c�a�t�i�o�n�s�
� �b�y� �s�e�n�d�i�n�g� �a� �m�e�s�s�a�g�e� �c�o�n�t�a�i�n�i�n�g� �a�n� �o�b�j�e�c�t� �t�h�a�t� �c�o�n�t�a�i�n�s� �a� �k�e�y� �o�f� ��l�o�c�a�t�i�o�n�s�
� �a�n�d� �a� �v�a�l�u�e� �t�h�a�t� �i�s� �a�n� �a�r�r�a�y� �o�f� �l�o�c�a�t�i�o�n� �o�b�j�e�c�t�s� �l�i�k�e� �t�h�e� �o�n�e� �s�h�o�w�n� �b�e�l�o�w�.� �A�n� �e�x�a�m�p�l�e� �o�f� �s�u�c�h� �a� �c�a�l�l� �a�n�d� �a� �l�o�c�a�t�i�o�n� �o�b�j�e�c�t� �i�s� �s�h�o�w� �b�e�l�o�w�.�
�
�
�
��
��j�a�v�a�s�c�r�i�p�t�
�
�/�/� �s�e�n�d�i�n�g� �l�o�c�a�t�i�o�n�s� �t�o� �t�h�e� �m�a�p�
�
�t�h�i�s�.�w�e�b�V�i�e�w�L�e�a�f�l�e�t�.�s�e�n�d�M�e�s�s�a�g�e�(�{�
�
� � �l�o�c�a�t�i�o�n�s�:� �[�.�.�.�t�h�i�s�.�s�t�a�t�e�.�l�o�c�a�t�i�o�n�s�]�
�
�}�)�;�
�
�
��
�
�
�
�
��
��j�a�v�a�s�c�r�i�p�t�
�
�/�/� �a� �l�o�c�a�t�i�o�n� �o�b�j�e�c�t�
�
�{�
�
� � �i�d�:� �u�u�i�d�V�1�(�)�,� �/�/� �T�h�e� �I�D� �a�t�t�a�c�h�e�d� �t�o� �t�h�e� �m�a�r�k�e�r�.� �I�t� �w�i�l�l� �b�e� �r�e�t�u�r�n�e�d� �w�h�e�n� �o�n�M�a�r�k�e�r�C�l�i�c�k�e�d� �i�s� �c�a�l�l�e�d�
�
� � �c�o�o�r�d�s�:� �[�L�A�T�I�T�U�D�E�,� �L�O�N�G�I�T�U�D�E�]�,� �/�/� �L�a�t�i�t�u�d�e� �a�n�d� �L�o�n�g�i�t�u�d�e� �o�f� �t�h�e� �m�a�r�k�e�r�
�
� � �i�c�o�n�:� �'�<�G�'�,� �/�/� �H�T�M�L� �e�l�e�m�e�n�t� �t�h�a�t� �w�i�l�l� �b�e� �d�i�s�p�l�a�y�e�d� �a�s� �t�h�e� �m�a�r�k�e�r�.� � �I�t� �c�a�n� �a�l�s�o� �b�e� �t�e�x�t� �o�r� �a�n� �S�V�G� �s�t�r�i�n�g�.�
�
�
�
� � �/�/� �T�h�e� �c�h�i�l�d� �o�b�j�e�c�t�,� �"�a�n�i�m�a�t�i�o�n�"�,� �c�o�n�t�r�o�l�s� �t�h�e� �o�p�t�i�o�n�a�l� �a�n�i�m�a�t�i�o�n� �t�h�a�t� �w�i�l�l� �b�e� �a�t�t�a�c�h�e�d� �t�o� �t�h�e� �m�a�r�k�e�r�.�
�
� � �/�/� �S�e�e� �b�e�l�o�w� �f�o�r� �a� �l�i�s�t� �o�f� �a�v�a�i�l�a�b�l�e� �a�n�i�m�a�t�i�o�n�s�
�
� � �a�n�i�m�a�t�i�o�n�:� �{�
�
� � � � �n�a�m�e�:� �a�n�i�m�a�t�i�o�n�s�[�M�a�t�h�.�f�l�o�o�r�(�M�a�t�h�.�r�a�n�d�o�m�(�)� �*� �a�n�i�m�a�t�i�o�n�s�.�l�e�n�g�t�h�)�]�,�
�
� � � � �d�u�r�a�t�i�o�n�:� �M�a�t�h�.�f�l�o�o�r�(�M�a�t�h�.�r�a�n�d�o�m�(�)� �_� �3�)� �+� �1�,�
�
� � � � �d�e�l�a�y�:� �M�a�t�h�.�f�l�o�o�r�(�M�a�t�h�.�r�a�n�d�o�m�(�)�)� �_� �0�.�5�,�
�
� � � � �i�n�t�e�r�a�t�i�o�n�C�o�u�n�t�
�
� � �}�
�
� � �/�/� �o�p�t�i�o�n�a�l� �s�i�z�e� �f�o�r� �t�h�i�s� �i�n�d�i�v�i�d�u�a�l� �i�c�o�n�
�
� � �/�/� �w�i�l�l� �d�e�f�a�u�l�t� �t�o� �t�h�e� �W�e�b�V�i�e�w�L�e�a�f�l�e�t� �
�d�e�f�a�u�l�t�I�c�o�n�S�i�z�e�� �p�r�o�p�e�r�t�y� �i�f� �n�o�t� �p�r�o�v�i�d�e�d�
�
� � �s�i�z�e�:� �[�6�4�,� �6�4�]�,�
�
�}�
�
�
��
�
�
�
�
�#�#�#� �A�v�a�i�l�a�b�l�e� �A�n�i�m�a�t�i�o�n�s�
�
�
�
�A�n�i�m�a�t�i�o�n�s� �f�o�r� �"�b�o�u�n�c�e�"�,� �"�f�a�d�e�"�,� �"�p�u�l�s�e�"�,� �"�j�u�m�p�"�,� �"�w�a�g�g�l�e�"�,� �"�s�p�i�n�"�,� �a�n�d� �"�b�e�a�t�"� �c�a�n� �b�e� �s�p�e�c�i�f�i�e�d� �i�n� �t�h�e� �a�n�i�m�a�t�i�o�n�.�n�a�m�e� �p�r�o�p�e�r�t�y� �o�f� �a�n� �i�n�d�i�v�i�d�u�a�l� �l�o�c�a�t�i�o�n�.�
�
�
�
�#�#�#� �A�n�i�m�a�t�i�o�n� �I�n�f�o�r�m�a�t�i�o�n�
�
�
�
�A�n�i�m�a�t�i�o�n�s� �a�r�e� �k�e�p�t� �i�n� �t�h�e� �f�i�l�e� �[�m�a�r�k�e�r�s�.�c�s�s�]�(�h�t�t�p�s�:�/�/�g�i�t�h�u�b�.�c�o�m�/�r�e�g�g�i�e�3�/�r�e�a�c�t�-�n�a�t�i�v�e�-�w�e�b�v�i�e�w�-�l�e�a�f�l�e�t�/�b�l�o�b�/�m�a�s�t�e�r�/�w�e�b�/�m�a�r�k�e�r�s�.�c�s�s�)� �T�h�e�y� �a�r�e� �j�u�s�t� �k�e�y�f�r�a�m�e� �a�n�i�m�a�t�i�o�n�s� �l�i�k�e� �t�h�i�s�:�
�
�
�
��
��j�a�v�a�s�c�r�i�p�t�
�
�@�k�e�y�f�r�a�m�e�s� �s�p�i�n� �{�
�
� � �5�0�%� �{�
�
� � � � �t�r�a�n�s�f�o�r�m�:� �r�o�t�a�t�e�Z�(�-�2�0�d�e�g�)�;�
�
� � � � �a�n�i�m�a�t�i�o�n�-�t�i�m�i�n�g�-�f�u�n�c�t�i�o�n�:� �e�a�s�e�;�
�
� � �}�
�
� � �1�0�0�%� �{�
�
� � � � �t�r�a�n�s�f�o�r�m�:� �r�o�t�a�t�e�Z�(�3�6�0�d�e�g�)�;�
�
� � �}�
�
�}�
�
�
��
�
�
�
�
��
��
�
�#�#� �C�h�a�n�g�e�l�o�g�
�
�
�
�#�#�#� �4�.�1�.�1�5�
�
�
�
�*� �K�e�e�p� �o�w�n� �p�o�s�i�t�i�o�n� �m�a�r�k�e�r� �f�r�o�m� �b�e�i�n�g� �c�l�u�s�t�e�r�e�d�
�
�
�
�#�#�#� �4�.�1�.�0�
�
�
�
�*� �A�d�d�e�d� �o�p�t�i�o�n�a�l� �m�a�r�k�e�r� �c�l�u�s�t�e�r�i�n�g� �u�s�i�n�g� �r�e�a�c�t�-�l�e�a�f�l�e�t�-�m�a�r�k�e�r�c�l�u�s�t�e�r�
�
�*� �U�p�d�a�t�e� �p�r�e�v�i�e�w� �v�i�d�e�o� �i�n� �r�e�a�d�m�e�
�
�
�
�#�#�#� �4�.�0�.�0�
�
�
�
�*� �F�i�x�e�d� �m�a�p� �c�e�n�t�e�r�i�n�g�,� �a�n�d� �m�a�p� �c�e�n�t�e�r�i�n�g� �b�u�t�t�o�n� �(�s�e�e� �i�s�s�u�e� �#�3�6�(�h�t�t�p�s�:�/�/�g�i�t�h�u�b�.�c�o�m�/�r�e�g�g�i�e�3�/�r�e�a�c�t�-�n�a�t�i�v�e�-�w�e�b�v�i�e�w�-�l�e�a�f�l�e�t�/�i�s�s�u�e�s�/�3�6�)� �)�
�
�#�#�#�#� �B�R�E�A�K�I�N�G� �C�H�A�N�G�E�S�:�
�
�*� �C�e�n�t�e�r� �m�a�p� �o�n� �o�w�n� �c�u�r�r�e�n�t� �l�o�c�a�t�i�o�n� �b�u�t�t�o�n� �d�e�f�a�u�l�t�s� �t�o� �n�o�t� �b�e�i�n�g� �s�h�o�w�n�
�
�*� �C�e�n�t�e�r� �m�a�p� �o�n� �o�w�n� �c�u�r�r�e�n�t� �l�o�c�a�t�i�o�n� �b�u�t�t�o�n� �r�e�q�u�i�r�e�s� �t�h�a�t� �a� �"�o�w�n�P�o�s�i�t�i�o�n�M�a�r�k�e�r�"� �o�b�j�e�c�t� �b�e� �p�a�s�s�e�d� �t�o� �t�h�e� �W�e�b�V�i�e�w�L�e�a�f�l�e�t� �c�o�m�p�o�n�e�n�t�
�
�*� �W�e�b�V�i�e�w�L�e�a�f�l�e�t� �c�o�m�p�o�n�e�n�t� �r�e�q�u�i�r�e�s� �a� �"�c�e�n�t�e�r�P�o�s�i�t�i�o�n�"� �p�r�o�p� �f�o�r� �i�n�i�t�i�a�l� �c�e�n�t�e�r�i�n�g�
�
�*� �M�a�p� �t�i�l�e� �L�a�y�e�r�s� �a�r�e� �n�o�w� �p�a�s�s�e�d� �a�s� �p�r�o�p�s� �t�o� �t�h�e� �W�e�b�V�i�e�w�L�e�a�f�l�e�t� �c�o�m�p�o�n�e�n�t�
�
�
�
�
�
�#�#�#� �3�.�1�.�4�5�
�
�
�
�*� �W�o�r�k�s� �i�n� �p�r�o�d�u�c�t�i�o�n� �A�P�K� �f�i�l�e�s�.�
�
�*� �R�e�n�d�e�r�s� �h�t�t�p� �i�m�a�g�e�s� �a�s� �m�a�p� �i�c�o�n�s�.�
�
�
�
�#�#�#� �3�.�0�.�0�
�
�
�
�*� �I�n�t�r�o�d�u�c�e�d� �u�s�e�r� �s�p�e�c�i�f�i�e�d� �t�i�l�e� �l�a�y�e�r�s�.�
�
�
�
�#�#�#� �2�.�0�.�0�
�
�
�
�*� �I�n�i�t�i�a�l� �r�e�l�e�a�s�e� �o�f� �v�e�r�s�i�o�n� �2� �b�u�i�l�t� �o�n� �R�e�a�c�t�-�L�e�a�f�l�e�t�
�
�
�
�#�#� �L�I�C�E�N�S�E�
�
�
�
�M�I�T�
�
�
��
�