Nearby object import using Google Maps - Waiviogit/waivio GitHub Wiki

The Nearby button, used to add objects via import, is located on the map page of sites. Its visibility is determined by the "Object editing by users" checkbox. If the checkbox is not selected, the button is visible to everyone. If selected, only admins and the site owner can see it.

The button is also displayed on the map in user profiles and the object map. image

Check authorization and vote power

When the button is clicked, a user will be verified that data import authorization is active and that the user's voice strength is sufficient (either the user is on the whitelist or the voice strength is greater than 0.0001).

If neither authorization nor voice strength meets the criteria, there is an error message (exceptions below). If only one of the conditions is unmet, there is a specific message indicating which one is lacking (either insufficient authorization or insufficient voice strength).

Nearby

If data import authorization is valid and the voice strength criteria are met, the Nearby modal will be opened. The modal consists of two steps:

  1. Setting search parameters for a request to Google Maps.
  2. Preparing the data import.

image image

Search step №1

At the top, there is breadcrumbs similar to the quick modal on dining gifts, consisting of two steps: Search - Search results.

Text Title: Find objects on Google Maps and import to Waivio.

Set map point: Select a point on the map. When the user clicks on map, a map icon will appear where the user clicked. The icon will look like a regular point but in solid red. Note text: Focus the map on the area where the place you want to add is located. For a more precise search, click on the map to set a pointer.

Search by name in Google Maps (optional): This is the second type of request, where both the name and coordinates fields are required. Enter the name in the text field.

Choose Google Maps type (optional): A dropdown to select the type of Google Maps search. User can choose from the supported types listed here: Google Maps Supported Types.

Search: A "Search" button to send the request to Google Maps and go to the 2nd step. This can be the first request, which uses coordinates and an optional type, or the second request, which uses the name, coordinates, and an optional type.

Cancel: Close the modal and cancel the action.

image

Search results step №2

At the top, there will be breadcrumbs similar to the quick modal on dining gifts, consisting of two steps: Search - Search results.

Google Maps found objects: The objects found by Google Maps will be displayed here, each with a checkbox. If a checkbox is selected, the object will be imported; if it is unselected, it will not. By default, all checkboxes are selected. A maximum of 20 objects will be retrieved. There is an address of object after name.

Tags (optional): A field for adding tags. Search is limited to hashtag types. User can add multiple tags. Placeholder: Select tags for imported objects. If restaurants are imported, tags will be added to Cuisine tag category.

Lists (optional): A field for specifying the lists to which the imported objects will be added. Search is limited to list types. You can add multiple lists. Placeholder: Select lists to add the imported objects.

Import: "Import" button to start the data import. And pop-up "Data import started successfully" is displayed.

Cancel: Close the modal and cancel the action.

Previous: Button to return to the previous step.

image

Nearby in Editor

The Nearby button is located in the plus menu. After clicking the Nearby button, the first step of the modal window opens. The location is taken from the user's current location.

In the second step, a radio button replaces the checkboxes. The user can import only one object at a time from this step. After clicking Import, the object card and link will appear in the editor without redirecting to the Data Import page; the user remains in the editor. The object permalink and company ID will be created, and all other fields will be populated through the import.

image

Image

Exceptions

  • Insufficient Vote Power: If a user doesn't have enough vote power, we will display the following message: "A minimum of $10 worth of WAIV Power is required to perform a data import. Please power up some WAIV to continue."
  • Data Import Authorization Not Active: If data import authorization is not active, we will display a message along with an Authorize button: "Please authorize the Data Import bot to post object updates on the Hive blockchain."

Default hashtag

There is a "Map Import Default Tag" in site Settings. After selecting a tag, it will appear as a default hashtag in the Configuration section. Once the user adds a tag in Settings, it will be displayed in the Nearby Import modal window on the second step. Similarly, the Editor also includes default tags.

Text:

Map Import Default Tag:
Find a tag
A tag will be added to the Nearby import on social site maps.

image

image

image

Additional information

  • [map / import] Add object import from map #6968
  • [import / nearby] Fixes for Nearby modal window #7079
  • [maps / import] when importing restaurants it is good that the tag is added to the existing tag category (Cuisine) rather than spawning Pros #7060
  • [editor / nearby] The link to a newly created object from an import should appear in the editor. #7074
  • [data import / map] In the dialog, you need to change the button to Next, and also the text to "Focus the map on the area where the place you want to add is located. For a more precise search, click on the map to set a pointer." #7101
  • [editor / nearby] Add a Nearby button to the 'plus' menu in the editor #6983
  • [waivio / import] Add nearby button to import from Google Maps to object type map on Map tab and user profile. #7048
  • [comments / nearby] Nearby for comments should work similarly to the editor #7121
  • [nearby / messages] change message text for Nearby #7131
  • [nearby / text] Fix the text for the first step button to "Search", and rename the second step to "Search Results". #7163
  • [settings / map default tag] Add Map Nearby Import Default Tag to Settings #7050