Skip Navigation

[Resolved] Disable js-toolset-maps-distance-current-location

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to disable the distance button on his parametric search.

Solution:

To disable the button you can use the js code below.

jQuery(document).ready(function(){
    jQuery('.js-toolset-maps-distance-current-location').attr('disabled','disabled');
  });
This support ticket is created 6 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 0.82 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 28 replies, has 3 voices.

Last updated by markusK-6 6 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#735611

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Markus,

Ahh yes i see the issue now.

Using this code again

jQuery(document).ready(function(){
    jQuery('.js-toolset-maps-distance-current-location').attr('disabled','disabled');
jQuery(".js-toolset-maps-distance-current-location").hide();
  });

Then you're going to add this code to the js section as well.

jQuery( document ).on( 'js_event_wpv_pagination_completed', function( event, data ) {
	/**
	* data.view_unique_id (string) The View unique ID hash
	* data.effect (string) The View AJAX pagination effect
	* data.speed (integer) The View AJAX pagination speed in miliseconds
	* data.layout (object) The jQuery object for the View layout wrapper
	*/
	   jQuery('.js-toolset-maps-distance-current-location').attr('disabled','disabled');
jQuery(".js-toolset-maps-distance-current-location").hide();
});

Please try this and let me know the results.
Thanks,
Shane

#739794

Hi Shane,

thank you but unfortunately, nothing has changed, the query is still there.

Nice regards
Markus

#743525

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Markus,

I tried this again using the test values that you had previously sent but this doesn't occur.

But you should bear in mind that distance filters require your location as this filter has the option to filter for areas that are close to you.

Thanks,
Shane

#748879

Hi Shane,

the browser question is still there.

To adjust that, please proceed as follows:

- hidden link
- type in location "langenfeld"
- change the radius to 5 and press ENTER
than appears the browser question.

It appears only when i press ENTER. When i use the arrows for distance then it is ok without the question from browser.

#749257

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Markus,

Could you check on your markers that you don't have a request for the current user's location. Example the marker should have a parameter like this current_visitor_location="true"

Please let me know.
Thanks,
Shane

#767497

Hi Shane,

no the code is:

[wpv-control-distance inputs_placeholder="<div align=center style='max-width:340px;'><h3 style='font-weight: 300;'>Zeige mir Ergebnisse aus %%CENTER%% im Umkreis von %%DISTANCE%% km an</h3></div>" visitor_location_button_text="Mein Standort" current_visitor_location="false" default_distance="15" compare_field="adresse" distance_center_url_param="toolset_maps_distance_center" distance_radius_url_param="toolset_maps_distance_radius" distance_unit_url_param="toolset_maps_distance_unit"]
#770870

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Markus,

The attribute is actually on the Marker the map markers not the filter code.

Could you check the map markers in the view loop and see if this attribute is there?

Thanks,
Shane

#771216

Hi Shane,

no there is nothing:

that is my code:

[wpv-layout-start]
<h3 align="center" style="font-weight: 300;">[wpv-found-count] Suchergebnisse</h3>
	[wpv-items-found]
	<!-- wpv-loop-start -->
	<wpv-loop>
     [wpv-conditional if="( $(paket) eq '1' )"]<!-- STYLE GOLD -->
     <div class="ergebnisse">
	<div class="row">
		<div class="col-sm-8" style="padding-right:4%;">
		  <h2 class="name">[wpv-post-title]</h2>
		  <hr style="color: #433B67; background-color: #433B67; height: 1px;">
          <div class="logo-mobile">[types field='logo'][/types]</div>
		  [types field='beschreibung'][/types]
		  <h2 class="name">Kontakt</h2>
		  <hr style="color: #433B67; background-color: #433B67; height: 1px;">
		  [wpv-map-render map_id="map-1-[wpv-post-id]"][/wpv-map-render]
		  [wpv-map-marker map_id="map-1-[wpv-post-id]" marker_id="marker-[wpv-post-id]" marker_title="[wpv-post-title]" marker_field="wpcf-adresse"][wpv-post-title][/wpv-map-marker]<br>
		
		   <div class="style1"><i class="fa fa-map-marker iconcolor"></i></div><div class="style2">Adresse</div><div class="style3">[types field='strasse'][/types]<br> [types field='plz'][/types]  [types field='ort'][/types]</div>
			[wpv-conditional if="( $(wpcf-telefon) eq '' )" evaluate="false"]	   
		   <div class="style1"><i class="fa fa-phone iconcolor"></i></div><div class="style2" >Telefon</div><div class="style3">[types field='telefon'][/types]</div>
          	[/wpv-conditional]
		   	[wpv-conditional if="( $(wpcf-fax) eq '' )" evaluate="false"]   
		   <div class="style1"><i class="fa fa-fax iconcolor"></i></div><div class="style2" >Fax</div><div class="style3">[types field='fax'][/types]</div>
          	[/wpv-conditional]
          	[wpv-conditional if="( $(wpcf-e-mail) eq '' )" evaluate="false"]
		   <div class="style1"><i class="fa fa-at iconcolor"></i></div><div class="style2" >E-Mail</div><div class="style3">[types field='e-mail'][/types]</div>
		   	[/wpv-conditional]
          	[wpv-conditional if="( $(wpcf-website) eq '' )" evaluate="false"]
		   <div class="style1"><i class="fa fa-globe iconcolor"></i></div><div class="style2" >Website</div><div class="style3">[types field='website' target='_blank' no_protocol='true'][/types]</div>
		    [/wpv-conditional]      
	</div>
	<div class="col-sm-4" style="padding-top:4%;">
      <div class="logo-desktop" align="center" style="max-width: 300px;">[types field='logo'][/types]</div>
      	<div align="center" style="max-width: 300px;" class="flexslider">
  			<ul class="slides">
   			[wpv-for-each field="wpcf-bilder-gallery"]
  			<li>[types field="bilder-gallery" size="medium" align="none" resize="pad" padding_color="#FFF"][/types]</li>
  			[/wpv-for-each]
  			</ul>
		</div>
      <br>
      <div class='webbutton'>[types field='website' target='_blank' title="WEBSITE <i class='fa fa-angle-double-right abstand'></i>"][/types]</div>
       <br>
		</div>
	</div>
</div>
     [/wpv-conditional]
     [wpv-conditional if="( $(paket) eq '2' )"]<!-- STYLE SILBER -->
    
      <div class="ergebnisse">
	<div class="row">
		<div class="col-sm-8" style="padding-right:4%;">
		  <h2 class="name">[wpv-post-title]</h2>
		  <hr style="color: #433B67; background-color: #433B67; height: 1px;">
          <div class="logo-mobile">[types field='logo'][/types]</div>
		  <h2 class="name">Kontakt</h2>
		  <hr style="color: #433B67; background-color: #433B67; height: 1px;">
		  
          <div class="style1"><i class="fa fa-map-marker iconcolor"></i></div><div class="style2">Adresse</div><div class="style3">[types field='strasse'][/types]<br> [types field='plz'][/types]  [types field='ort'][/types]</div>
			[wpv-conditional if="( $(wpcf-telefon) eq '' )" evaluate="false"]	   
		   <div class="style1"><i class="fa fa-phone iconcolor"></i></div><div class="style2" >Telefon</div><div class="style3">[types field='telefon'][/types]</div>
          	[/wpv-conditional]
		   	[wpv-conditional if="( $(wpcf-fax) eq '' )" evaluate="false"]   
		   <div class="style1"><i class="fa fa-fax iconcolor"></i></div><div class="style2" >Fax</div><div class="style3">[types field='fax'][/types]</div>
          	[/wpv-conditional]
          	[wpv-conditional if="( $(wpcf-e-mail) eq '' )" evaluate="false"]
		   <div class="style1"><i class="fa fa-at iconcolor"></i></div><div class="style2" >E-Mail</div><div class="style3">[types field='e-mail'][/types]</div>
		   	[/wpv-conditional]
          	[wpv-conditional if="( $(wpcf-website) eq '' )" evaluate="false"]
		   <div class="style1"><i class="fa fa-globe iconcolor"></i></div><div class="style2" >Website</div><div class="style3">[types field='website' target='_blank'][/types]</div>
		    [/wpv-conditional]
		          
	</div>
	<div class="col-sm-4" style="padding-top:4%;">
      <div class="logo-desktop" align="center" style="max-width: 300px;">[types field='logo'][/types]</div>
      	
		</div>
	</div>
</div>  
      [/wpv-conditional]
      [wpv-conditional if="( $(paket) eq '3' )"]<!-- STYLE BRONZE -->
      <div class="ergebnisse">
      <h5 style="color: #433B67; font-size:20px; font-weight: 400;">[wpv-post-title]</h5>
          <p class="stylebronze">[types field='strasse'][/types]<br>
          [types field='plz'][/types] [types field='ort'][/types]</p>
          <p class="stylebronze">Telefon: [types field='telefon'][/types]</p>
	  </div>

      [/wpv-conditional]

	</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]Leider wurden keine Einträge gefunden. Bitte verändern Sie Ihre Sucheingabe![/wpml-string]</strong>
	[/wpv-no-items-found]
<div align="center">[wpv-pager-nav-links output="bootstrap" previous_next_links="true" reach="4" text_for_previous_link="<" text_for_next_link=">"]</div>

[wpv-layout-end]
<div class="hinweis">Änderungen der Daten senden Sie uns bitte per E-Mail, Fax, Änderungsformular oder Post zu. Wir aktualisieren Ihre Angaben schnellstmöglich. Sollten Sie eine Veröffentlichung Ihrer Firmenangaben nicht wünschen, so teilen Sie uns dies bitte mit. Wir werden Ihre Daten dann unverzüglich löschen. Für die Richtigkeit der gemachten Angaben übernehmen wir keinerlei Gewähr.</div>
#772614

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Markus,

Would you mind providing me with access to the site to test this out again and see if I can find anything that could be causing this ?

Thanks,
Shane

#784527

Hi Markus,

I hope that you are getting a good support from Shane.

I'm posting here because the Topic became too long and this is actually because there is more than one request being handled in the ticket.

And according to the support policy: https://toolset.com/toolset-support-policy/
There should be only one issue to be handled in every single ticket.

So, I'm kindly asking you when you open a ticket in the support forum, please request the help in only one issue in each ticket you open and we will handle it with pleasure.

This actually helps to make the forum better, more organized and helps you and others while searching the forum.

Best wishes,
Mohammed.

#787064

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Markus,

Yes as Mohammed mention we handle one topic per thread.

In order to not allow this ticket to be too long would you mind opening a new ticket for the chrome permissions issue?

Thanks,
Shane

#838793
#844603

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Markus,

Could you mark this ticket as resolved if there are no further issues on this ?

Thanks,
Shane

#852394

Thank you for help!