Support

Account

Home Forums Front-end Issues Relationship field & google maps

Solving

Relationship field & google maps

  • I’ve seen the example using a repeater field and google maps for multiple markers.

    But can this be done using the relationship field instead?

    I have a custom post type each post has its own location. I’d like to use the relationship field on pages where the user can set what locations to show on a map for that page.

  • what I currently have, but doesn’t work is:

    <div class="acf-map">
    	<?php
    	$featured_projects = get_field('locations_all');//relationship 	 
    	if( $featured_projects ): ?>
    		<?php foreach( $featured_projects as $featured_project ):
    		$featured_project_id = $featured_project->ID; 
    		$location = get_field('location');//field 	
    		?>
    	<div class="marker" data-lat="<?php echo $location['lat'], $featured_project_id; ?>" data-lng="<?php echo $location['lng'], $featured_project_id; ?>">
    	</div>
    <?php endforeach; ?>
    <?php endif; ?>	
    </div>	
  • Cheap 2014 official MLB jerseys discount!

    “There’s a guy within the mound St. Louis Cardinals Jersey who’s got to eat also and you are likely to be battling each other and participating in chess,” Jones explained. David Ortiz Jersey “Today, we ended up equipped for getting for the queen a lot quicker.” Red Sox Mike Napoli jersey

    The Orioles improved to 3-5 and experienced their most runs considering the fact that Aug. 10, 2010, at Cleveland In addition they had twenty hits, which ended up essentially the most because May well ten, 2011, in opposition to the Seattle Mariners.

    Jones strike a two-run homer off Yankees starter Ivan Nova within the ninth pitch on the working day when he drove a 1-1 fastball in excess of the center-field wall to established the tone.

    Apart from Jones, designated hitter Delmon Younger and catcher Matt Wieters also homered for the Orioles, who experienced eight players with no less than two hits. Baltimore elevated its group batting ordinary 37 points to .268, accomplishing so right after 3 in their losses were by two runs or fewer.

    “You fellas want effects, I received that,” Jones said. “It’s all about results, but we glance at points a little bit differently. We’ve had great at-bats and that is all we actually inquire from all people.”

    Baltimore manager Buck Showalter explained, “It’s been 6 or 7 games. We will not are living in that world. You have faith in your guys and their observe history.”

    That also bundled the underside on the lineup as second baseman Steve Lombardozzi, shortstop Ryan Flaherty and 3rd baseman Jonathan Schoop combined for 8 hits and scored 4 operates.

    Apart from the home runs as well as production from the base on the get, first baseman Chris Davis experienced an RBI solitary and certainly one of three Baltimore sacrifice flies. Left fielder Nelson Cruz contributed an RBI double, Youthful extra a run-scoring one, and proper fielder Nick Markakis and Wieters lifted sacrifice flies.Adrian Beltre Jersey

    Baltimore won with the fourth time in its very last 12 visits to Ny plus the outburst authorized Wei-Yin Chen to pick up the victory inspite of some shaky times.

    The Yankees made the moves prior to Tuesday’s video game in opposition to Baltimore. Robertson was stated retroactive to Monday.

    Robertson posted two will save in 3 online games since the alternative for retired Yankees closer Mariano Rivera in advance of acquiring harm. Robertson said he felt distress all through Sunday’s outing at Toronto, and does not be expecting to get Elvis Andrus Jersey sidelined for additional than fifteen times.

    Jeter has reported this will be his remaining time, and he was already feted with presents while in the club’s opening series in Houston. The shortstop, who turns 40 on June 26, Custom Rangers Jersey did not get much too lots of from opposing pitchers in his initial 4 game titles, heading two for eleven in advance of singling twice in the 6-4 earn in Toronto on Sunday.

    The next strike was the three,320th of his profession and moved him previous Paul Molitor for eighth about the all-time list.

    Jeter will probably be reunited while using the 3 other associates of the “Core Four” that aided insert 5 Globe Sequence title into the franchise’s presently considerable selection. Yankees legends Mariano Rivera and Andy Pettitte are scheduled to throw out initially pitches to Jeter and previous catcher Jorge Posada. St. Louis Cardinals customized jersey

    Jeter’s parents, Charles and Dorothy, are expected to be in attendance.

    Reds reported manager Brian Price reported Latos has elbow irritation and can be reevaluated inside of a couple of times. Price mentioned when there exists no timetable for Latos’ upcoming begin, the staff wasn’t viewing the setback as really serious. Yadier Molina Jersey

    Latos did not pitch inside of a spring training activity and had offseason operation on his suitable elbow and his left meniscus. Pursuing just one rehab start with Double-A Pensacola, allowing for 5 operates in 4 innings, he was scheduled to pitch Tuesday evening for Louisville.

    Also Tuesday, right-handed reliever Jonathan Broxton was activated R.A. Dickey Jersey within the disabled listing to interchange right-hander Trevor Bell. Bell was put on the 15-day disabled checklist with elbow irritation.new york yankees Jacoby Ellsbury Jersey

    St. Louis (4-3) hit a staggering .330 with runners in scoring position past yr, baseball’s highest mark since 1974. Derek Jeter Jersey The team’s .269 over-all common ranked fourth in the majors.Authentic Brandon Phillips Jersey

    Up to now, that good results hasn’t carried more than to the reigning NL winner.Cheap Toronto Blue Jays Jersey, 2014 Toronto Blue Jays Jerseys

    The Cardinals are batting a mere .199, such as .167 with runners in scoring place though alternating wins and losses by 7 online games. Nonetheless, St. Louis did all of its scoring Monday while going three for 12 with two doubles in that circumstance to conquer the Reds 5-3 in its house opener.Cincinnati Reds Joey Votto jersey

    Even now, the Cardinals’ best performance this year came in the 7-6 win at Cincinnati on Thursday, whenever they 2014 New York Yankees Jersey Sale experienced period highs in operates, hits (eleven) and extra-base hits (5). Red Sox Jersey Shop

    Much of thatnew york Yankees customized jersey damage arrived for the cost of Bailey, who surrendered four operates and 7 hits with a few walks in four 1-3 innings. It absolutely was the right-hander’s 1st time on the mound given that March 10 as a consequence of a strained groin.Cincinnati Reds Jersey

    “For me, missing these two 1/2 weeks without mound time in spring schooling variety of came again and bit me,” Bailey informed the team’s official web site. cheap customized Reds jersey “You could certainly explain to I was not sharp. A great deal of walks, just a great deal of pitches that missed by an inch or two.”Blue Jays Jose Bautista Jersey

    That absolutely was not the situation in Matt Carpenter Cardinals Jersey Bailey’s most up-to-date outing in St. Louis on Aug. 28, hanging out seven though scattering five hits in seven 1-3 innings of the 10-0 earn. That was a welcome change soon after

    new york yankees jersey heading 0-5 by using a six.90 Period above his former 7 starts off there. Michael Wacha Cardinals Jersey Sale

    Bailey must contend with Matt Holliday, who owns a .351 normal against him and experienced an RBI double in Thursday’s matchup.Derek Holland Jersey The still left fielder linked for one more a single inside the opener of this three-game Cheap Toronto Blue Jays Jersey series when scoring twice and drawing two walks.

  • I’m also looking to work this out – IF you come up with something please post it here. I’ll do likewise.

  • found this from another post – Worked like a charm for me.

    
    <?php $posts = get_field('featured_space'); if( $posts ): ?>
      <div class="acf-map">
        <?php foreach( $posts as $post): // variable must be called $post (IMPORTANT) ?>
          <?php setup_postdata($post); ?>
            <?php $space_address = get_field('space_address', $post->ID); ?>
              <div class="marker" data-lat="<?php echo $space_address['lat']; ?>" data-lng="<?php echo $space_address['lng']; ?>">
                <h4><?php the_title();?></h4>
                <p><?php echo $space_address['address']; ?></p>
    					</div><!--/.marker-->
    	  <?php endforeach; ?>
        <?php wp_reset_postdata(); // IMPORTANT - reset the $post object so the rest of the page works correctly ?>
    	</div><!--/.acf-map-->
    <?php endif; ?>
    
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.