Results 1 to 4 of 4

Thread: Replicate single job's page Google Map into the Header as background

  1. #1
    Thread Starter
    kuif75's Avatar
    Join Date
    Jun 2011
    Location
    Netherlands
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Replicate single job's page Google Map into the Header as background

    Can somebody please help me with this:

    Im trying to replicate / move the Listing's Google Map (the one that appears when one clicks on ''View map") to the header of the template as a header background. The function that appends/loads the google map is in /includes/theme-geolocation.php

    This is what added in the childthemes header.php, but with no succes:
    Code:
    ....
    .....
    <div id="job_map_back" style="height: 200px;width:100%;"> map to be appended in this block </div>
    
    <script type="text/javascript">
    function {
    global $post;
    
    $title = str_replace('"', '&quot;', wptexturize($post->post_title));
    $topback-long     = get_post_meta($post->ID, '_jr_geo_longitude', true);
    $topback-lat     = get_post_meta($post->ID, '_jr_geo_latitude', true);
    
    if (!$tlong || !$tlat) return;
    
    
    /* <![CDATA[ */
    jQuery.noConflict();
    (function($) {
    
    $(function() {
    
    // Map global vars
    var child_map;
    var child_marker;
    var child_center;
    
    // initialize Google Maps API
    function child_initMap() {
    
    // Define Map center
    child_center = new google.maps.LatLng('<?php echo $topback-lat; ?>','<?php echo $topback-long; ?>');
    
    // Define Map options
    var child_myOptions = {
    'zoom': 14,
    'center': child_center,
    'mapTypeId': google.maps.MapTypeId.ROADMAP,
    'scrollwheel': false
    };
    
    // Load Map
    child_map = new google.maps.Map(document.getElementById('job_map_back'), child_myOptions);
    
    // Marker
    child_marker = new google.maps.Marker({ position: center, map: map, title: "<?php echo $title; ?>" });
    }
    
    // Slide Toggle
    child_initMap();
    jQuery('#job_map_back').ready(function(){
    google.maps.event.trigger(child_map, 'resize');
    child_map.setCenter(child_center);
    });
    });
    
    
    })(jQuery);
    /* ]]> */
    </script>
    That doesnt work out well as u might see.

    Please HELP?

  2. #2
    Thread Starter
    kuif75's Avatar
    Join Date
    Jun 2011
    Location
    Netherlands
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  3. #3
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,692
    Thanks
    166
    Thanked 3,386 Times in 3,257 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  4. #4
    Thread Starter
    kuif75's Avatar
    Join Date
    Jun 2011
    Location
    Netherlands
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to replicate a listing
    By saqibr in forum Vantage General Discussion (Legacy)
    Replies: 1
    Last Post: April 7th, 2013, 11:04 PM
  2. How to replicate a listing
    By saqibr in forum Report Vantage Bugs (Legacy)
    Replies: 1
    Last Post: March 28th, 2013, 05:58 PM
  3. How to change the Header Background to my custom Header Background Image
    By tyrone in forum ClassiPress General Discussion
    Replies: 2
    Last Post: September 28th, 2011, 12:06 PM
  4. Replies: 1
    Last Post: September 28th, 2011, 07:29 AM
  5. Header background size and color code for Green Theme - Black Header
    By danappel in forum ClassiPress General Discussion
    Replies: 3
    Last Post: February 23rd, 2011, 11:06 AM