Gmaps Widget not going to full page map in sidebar

This topic contains 24 replies, has 3 voices, and was last updated by  Stiofan O’Connor 9 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #27388

    Paolo
    Site Admin
    Post count: 31206

    Hi Delek,

    what do you mean by turn on POI?

    Currently we only provide integration with Google Maps API for displaying maps and to fetch lat and longs of addresses. We don’t query the Google Place API anywhere…

    Listings must be entered by the site admin directly.

    Let us know,

    Thanks

    #27390

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Delek,

    If you need help with the CSS let me know, i had to do z-index:-1 on some div’s…

    poi.business is set to have visability turened off by default.
    You can look at map.js and edit the var stlyes or the addon “Custom Google Maps” will let u turn on the viability and do lots more.

    What exactly do you mean by this one? “– is there a way to use the Google Places API for searches?

    Thanks,

    Stiofan

    #27924

    Delek Smythe
    Free User
    Post count: 11

    Hi,
    Sorry for the long wait. I have figured the CSS out, thank you for the offer of support on that. I have also figured the map.js styles as well.

    Now on to another issue, which is performance. I am getting an average load time of 1.7 sec for Geodirectory. While I realize it is a large plugin is this a normal load time?

    I see that you have a performance plugin and am wondering what to expect by adding that on?

    Can you give me a comparison to using W3TC for caching and minifying? And are they compatible with each other?

    My main issue is that Geodirectory seems to be loading all (css & js) scripts on all pages, not just the ones using it. I am wondering why they are not conditionally enqueued?

    Thank you again for your diligence!
    Delek

    #28008

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Delek,

    I’m glad you resolved the CSS issue.

    W3TC is not 100% compatable, there have been a few bugs reported between them. GD Booster does concatenate the scripts and minifies the CSS.

    Some files are conditionally enqueued but most are needed.

    Thanks,

    Stiofan

    #28015

    Delek Smythe
    Free User
    Post count: 11

    Thanks for responding Steofan,

    So I get this right..

    You’re saying that the scripts loading on my front page etc.. need to be loaded on the rest of my pages for some reason? There are, give or take, 28 scripts that are being loaded individually. I am not understanding why they aren’t loaded only on the pages where geodir is used? That is a ton of requests and considerably slow down the rest of the site..

    And thus, if I were to use GD Booster I cannot use another caching or minifying plugin for my other pages?

    Am I getting what you’re saying right? Or do you have fairly solid instructions that I can use to allow them to coexist?

    Cheers,
    Delek

    #28021

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Delek,

    DO you mean our scripts or other scripts, can you provide an example so we are both on the same page 🙂

    GD uses $_SESSIONS for many things and caching plugins usually cause problems with them, so we created out own plugin to try and take the best bits of others and have it work properly.

    I do not think they would play well together.

    Stiofan

    #28023

    Delek Smythe
    Free User
    Post count: 11

    HEAD:

    <link rel=’stylesheet’ id=’geodirectory-frontend-style-css’ href=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/css/style.css?fcd3b5″ type=’text/css’ media=’all’ />
    <link rel=’stylesheet’ id=’geodirectory-media-style-css’ href=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/css/media.css?fcd3b5″ type=’text/css’ media=’all’ />
    <link rel=’stylesheet’ id=’geodirectory-jquery-ui-css-css’ href=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/ui/jquery-ui.css?fcd3b5″ type=’text/css’ media=’all’ />
    <link rel=’stylesheet’ id=’geodirectory-jquery-ui-timepicker-css-css’ href=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/ui/jquery.ui.timepicker.css?fcd3b5″ type=’text/css’ media=’all’ />
    <link rel=’stylesheet’ id=’geodirectory-flexslider-css-css’ href=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/css/flexslider.css?fcd3b5″ type=’text/css’ media=’all’ />
    <link rel=’stylesheet’ id=’geodirectory-thic-box-css-css’ href=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/css/thic-box.css?fcd3b5″ type=’text/css’ media=’all’ />
    <link rel=’stylesheet’ id=’geodirectory-pluplodar-css-css’ href=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/css/pluploader.css?fcd3b5″ type=’text/css’ media=’all’ />
    <link rel=’stylesheet’ id=’geodirectory-lightbox-css-css’ href=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/css/jquery.lightbox-0.5.css?fcd3b5″ type=’text/css’ media=’all’ />
    <link rel=’stylesheet’ id=’geodir-rating-style-css’ href=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/css/jRating.jquery.css?fcd3b5″ type=’text/css’ media=’all’ />
    <link rel=’stylesheet’ id=’geodir-jslider-style-css’ href=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/css/jslider.css?fcd3b5″ type=’text/css’ media=’all’ />
    <link rel=’stylesheet’ id=’geodir-chosen-style-css’ href=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/css/chosen.css?fcd3b5″ type=’text/css’ media=’all’ />
    <link rel=’stylesheet’ id=’geodirectory-frontend-rtl-style-css’ href=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/css/rtl-frontend.css?fcd3b5″ type=’text/css’ media=’all’ />
    <link rel=’stylesheet’ id=’geodirectory-font-awesome-css’ href=”//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css?fcd3b5″ type=’text/css’ media=’all’ />

    <script type=”text/rocketscript” data-rocketsrc=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/js/jquery.flexslider.js?fcd3b5″></script>
    <script type=”text/rocketscript” data-rocketsrc=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/js/jquery.lightbox-0.5.js?fcd3b5″></script>
    <script type=”text/rocketscript” data-rocketsrc=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/js/jquery.simplemodal.js?fcd3b5″></script>
    <script type=”text/rocketscript” data-rocketsrc=’//maps.google.com/maps/api/js?sensor=false&language=en’></script>
    <script type=”text/rocketscript” data-rocketsrc=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/js/goMap.js?fcd3b5″></script>
    <script type=”text/rocketscript” data-rocketsrc=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/js/chosen.jquery.js?fcd3b5″></script>
    <script type=”text/rocketscript” data-rocketsrc=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/js/ajax-chosen.js?fcd3b5″></script>
    <script type=”text/rocketscript” data-rocketsrc=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/js/post.custom.js?fcd3b5″></script>
    <script type=”text/rocketscript”>
    /* <![CDATA[ */
    var geodir_ajax = {“url”:”http://www.balifaq.com?geodir_ajax=true”};
    var geodir_var = {“siteurl”:”http://www.balifaq.com”,”geodir_plugin_url”:”http://www.balifaq.com/wp-content/plugins/geodirectory”,”geodir_ajax_url”:”http://www.balifaq.com/wp-admin/admin-ajax.php?action=geodir_ajax_action”,”geodir_gd_modal”:”1″};
    /* ]]> */
    </script>
    <script type=”text/rocketscript” data-rocketsrc=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/js/geodirectory.js?fcd3b5″></script>
    <script type=”text/rocketscript” data-rocketsrc=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/js/jRating.jquery.js?fcd3b5″></script>
    <script type=”text/rocketscript” data-rocketsrc=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/js/on_document_load.js?fcd3b5″></script>
    <script type=”text/rocketscript” data-rocketsrc=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/js/geometa.js?fcd3b5″></script>

    BODY:

    <script type=”text/rocketscript”>var post_category_array = {“post_category_array”:””};</script><script type=”text/rocketscript”>var geodir_all_js_msg = {“geodir_plugin_url”:”http://www.balifaq.com/wp-content/plugins/geodirectory”,”geodir_admin_ajax_url”:”http://www.balifaq.com/wp-admin/admin-ajax.php”,”custom_field_not_blank_var”:”HTML Variable Name must not be blank”,”custom_field_not_special_char”:”Please do not use special character and spaces in HTML Variable Name.”,”custom_field_unique_name”:”HTML Variable Name should be a unique name.”,”custom_field_delete”:”Are you wish to delete this field?”,”tax_meta_class_succ_del_msg”:”File has been successfully deleted.”,”tax_meta_class_not_permission_to_del_msg”:”You do NOT have permission to delete this file.”,”tax_meta_class_order_save_msg”:”Order saved!”,”tax_meta_class_not_permission_record_img_msg”:”You do not have permission to reorder images.”,”address_not_found_on_map_msg”:”Address not found for:”,”my_place_listing_del”:”Are you wish to delete this listing?”,”rating_error_msg”:”Error : please retry”,”listing_url_prefix_msg”:”Please enter listing url prefix”,”invalid_listing_prefix_msg”:”Invalid character in listing url prefix”,”location_url_prefix_msg”:”Please enter location url prefix”,”invalid_location_prefix_msg”:”Invalid character in location url prefix”,”location_and_cat_url_separator_msg”:”Please enter location and category url separator”,”invalid_char_and_cat_url_separator_msg”:”Invalid character in location and category url separator”,”listing_det_url_separator_msg”:”Please enter listing detail url separator”,”invalid_char_listing_det_url_separator_msg”:”Invalid character in listing detail url separator”,”loading_listing_error_favorite”:”Error loading listing.”,”geodir_field_id_required”:”This field is required.”,”geodir_valid_email_address_msg”:”Please enter valid email address.”,”geodir_default_marker_icon”:”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-functions/map-functions/icons/pin.png”,”geodir_latitude_error_msg”:”A numeric value is required. Please make sure you have either draged the marker or clicked the button: Set Address On Map”,”geodir_longgitude_error_msg”:”A numeric value is required. Please make sure you have either draged the marker or clicked the button: Set Address On Map”,”geodir_default_rating_star_icon”:”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/images/stars.png”,”gd_cmt_btn_post_reply”:”Post Reply”,”gd_cmt_btn_reply_text”:”Reply text”,”gd_cmt_btn_post_review”:”Post Review”,”gd_cmt_btn_review_text”:”Review text”,”gd_cmt_err_no_rating”:”Please select star rating, you can’t leave a review without stars.”};</script>

    <script type=”text/rocketscript”>
    var default_location = ‘Bali’;
    var latlng;
    var Sgeocoder;
    var address;
    var dist = 0;
    var Sgeocoder = new google.maps.Geocoder();

    function geodir_setup_submit_search(){

    jQuery(‘.geodir_submit_search’).click(function(){
    var s = ‘ ‘;

    var $form = jQuery(this).closest(‘form’);

    if(jQuery(“#sdist input[type=’radio’]:checked”).length != 0)
    dist = jQuery(“#sdist input[type=’radio’]:checked”).val();

    if(jQuery(‘.search_text’,$form).val() == ” || jQuery(‘.search_text’,$form ).val() == ‘Search for’)
    jQuery(‘.search_text’,$form).val(s);
    if(dist > 0 || (jQuery(‘select[name=”sort_by”]’).val() == ‘nearest’ || jQuery(‘select[name=”sort_by”]’,$form).val() == ‘farthest’) || ( jQuery(“.snear”,$form ).val() != ” && jQuery(“.snear”,$form ).val() != ‘Near’) )
    { geodir_setsearch($form); }
    else
    {
    jQuery(“.snear”,$form ).val(”);
    jQuery($form).submit();
    }

    });

    }

    jQuery(document).ready(function(){

    /*jQuery(‘#sort_by’).change(function(){

    jQuery(‘.geodir_submit_search:first’).click();

    });*/

    geodir_setup_submit_search();
    });
    function geodir_setsearch($form)
    { if( ( dist > 0 || (jQuery(‘select[name=”sort_by”]’,$form).val() == ‘nearest’ || jQuery(‘select[name=”sort_by”]’,$form).val() == ‘farthest’)) && (jQuery(“.snear”,$form).val() == ” || jQuery(“.snear”,$form).val() == ‘Near’ ) )
    jQuery(“.snear”,$form).val(default_location);

    geocodeAddress($form);
    }

    function updateSearchPosition(latLng,$form) {
    jQuery(‘.sgeo_lat’).val(latLng.lat());
    jQuery(‘.sgeo_lon’).val(latLng.lng());
    jQuery($form).submit(); // submit form after insering the lat long positions
    }

    function geocodeAddress($form) {
    Sgeocoder = new google.maps.Geocoder(); // Call the geocode function

    if(jQuery(‘.snear’,$form).val() == ” || ( jQuery(‘.sgeo_lat’).val()!=” && jQuery(‘.sgeo_lon’).val()!=” ) || jQuery(‘.snear’,$form).val().match(“^In:”)){
    if(jQuery(‘.snear’,$form).val().match(“^In:”)){jQuery(“.snear”,$form).val(”);}
    jQuery($form).submit();
    }else{

    var address = jQuery(“.snear”,$form).val();

    if(jQuery(‘.snear’,$form).val() == ‘Near’){
    initialise2();
    }else{

    Sgeocoder.geocode( { ‘address’: address },
    function(results, status) {
    if (status == google.maps.GeocoderStatus.OK) {
    updateSearchPosition(results[0].geometry.location,$form);
    } else {
    alert(“Search was not successful for the following reason:” + status);
    }
    });
    }
    }
    }

    function initialise2() {
    var latlng = new google.maps.LatLng(56.494343,-4.205446);
    var myOptions = {
    zoom: 4,
    mapTypeId: google.maps.MapTypeId.TERRAIN,
    disableDefaultUI: true
    }
    //alert(latLng);
    prepareGeolocation();
    doGeolocation();
    }

    function doGeolocation() {
    if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(positionSuccess, positionError);
    } else {
    positionError(-1);
    }
    }

    function positionError(err) {
    var msg;
    switch(err.code) {
    case err.UNKNOWN_ERROR:
    msg = “Unable to find your location”;
    break;
    case err.PERMISSION_DENINED:
    msg = “Permission denied in finding your location”;
    break;
    case err.POSITION_UNAVAILABLE:
    msg = “Your location is currently unknown”;
    break;
    case err.BREAK:
    msg = “Attempt to find location took too long”;
    break;
    default:
    msg = “Location detection not supported in browser”;
    }
    jQuery(‘#info’).html(msg);
    }

    function positionSuccess(position) {
    var coords = position.coords || position.coordinate || position;
    jQuery(‘.sgeo_lat’).val(coords.latitude);
    jQuery(‘.sgeo_lon’).val(coords.longitude);

    jQuery($form).submit();
    }

    </script>

    <script type=”text/rocketscript” data-rocketsrc=”http://www.balifaq.com/wp-content/plugins/geodirectory/geodirectory-assets/ui/jquery.ui.timepicker.js?fcd3b5″></script>

    #28025

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    and what bit are u worried about that is not needed?

    #28030

    Delek Smythe
    Free User
    Post count: 11

    That was pulled from the front page..

    I’ve got W3TC running with it now, took a little bit of doing but seems to play ok.

    Well this may be a deal breaker for me, if I’m not able to make the rest of my website performant, and have extraneous scripts loading that really shouldn’t be on the rest of the site.

    I do understand that there are complications that can arise with things.

    And I do understand that $_SESSIONS needs to run for logins etc.. But why are all of the CSS scripts not conditional, at the very least?

    It seems a bit odd that your plugin doesn’t play well with WP common practice methods. And the booster addon’s caching cannot be turned off I take it?

    Not sure what you expect people to do, serve the directory on a separate instance, buffered from the rest of their sites?

    Is there a way to just get these scripts cleaned up in an efficient matter without derailing the rest of the site? Or is this written primarily for those that don’t have anything other than a directory on their site?

    Granted, my assessment may not be completely accurate, as I am not a coding guru and work more on the design end of things. However, I can see what takes time to load on my site, and GD sucks up the most by far, even on pages where it is not used one bit..

    #28186

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Delek,

    They are called separately in this manner so they can be removed for any reason through the normal wordpress functions.

    I have added a task in our project manager to review the script/css loading to optimize it as best as possible.

    Thanks,

    Stiofan

Viewing 10 posts - 16 through 25 (of 25 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket