Error on Google Map APi's following your geolocation documentation

Hello support,

Based on your guide, How to get a Google Maps API key - HivePress Help Center. I need to get 3 API’s and another 3 unrestricted API’s with a total of 6 API’s. Looking into integration TAB, there is only 1 field each for API and secret. I tried to put all three using comma but the Listing LOCATION freezes after entering 1 to 2 characters.

Please direct me to a proper guide/documentation.

I tried only MAP API KEY, but I’m getting inconsistent data result, using rentalhive the address/location cannot be found BUT using directly to google map search bar the listing address can be found.

Thank you in advance for assistance.

Hi,

These APIs should be created in the Google Console and not added to the integrations tab. If you need to set up a Geolocation extension, I recommend using MapBox as it is easier to set up: How to get a Mapbox API key - HivePress Help Center

​I hope this is helpful to you.

I saw php snippet using long and lat coordinates to provide exact listinf location to the map.

When I enable it and created long and lat attributes, it doesnt work. Can you guide me how to properly make thar snipper work? I’m referring to this code - what it actually do?


add_filter(
	'hivepress/v1/models/listing/attributes',
	function( $attributes ) {
		if ( isset( $attributes['location'] ) ) {
			$categories = [ 1, 2, 3 ];

			$attributes['location']['categories']  = $categories;
			$attributes['latitude']['categories']  = $categories;
			$attributes['longitude']['categories'] = $categories;
		}

		return $attributes;
	},
	1000
);

Hi,

This snippet allows you to make the location required field only in the specified categories.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.