Forum Replies Created

Viewing 15 replies - 1 through 15 (of 19 total)
  • Thread Starter weslebsack

    (@weslebsack)

    Just wanted to follow up–does anyone know the answer to this?

    Thread Starter weslebsack

    (@weslebsack)

    Just wanted to follow up–does anyone know the answer to this?

    For sure. Thanks for putting in the time to help. Five stars for this plugin!

    Oh wow, putting the latitude and longitude in the place of “REVALIDATE” fixed it! Thank you so much!

    That’s the thing–I’m not using a shortcode. I generated a dummy one with two addresses in it, pasted it into a post, then viewed the source code to get the generated markup and Javascript so I could see the generated syntax and integrate it with a loop to dynamically plot the points.

    In other words, I literally copied and pasted the HTML and Javascript that the plugin generated and pasted it into my page template because I needed to be able to plot points from a loop.

    Here’s the hardcoded HTML that I’m using in my template, that was generated from the shortcode, with the PHP that I added to generate the loop:

    <div class="cgmp-centering-container-handle" align="center"><div class="google-map-placeholder" id="3d2e8c9b8886a331761c647d49330026" style="width: 920px; height: 335px;"><div align="center" style="background:url('https:///wp-content/plugins/comprehensive-google-map-plugin/assets/css/images/loading.gif') no-repeat 0 0 transparent !important; height:100px; width:100px; position: relative; top: 125px !important;"></div></div>
    
    			<div class="direction-controls-placeholder" id="direction-controls-placeholder-3d2e8c9b8886a331761c647d49330026" style="background: white; width: 350px; margin-top: 5px; border: 1px solid #EBEBEB; display: none; padding: 18px 0 9px 0;">
    			<div class="d_close-wrapper">
    				<a id="d_close" href="javascript:void(0)">
    					<img src="https:///wp-content/plugins/comprehensive-google-map-plugin/assets/css/images/transparent.png" class="close">
    				</a>
    			</div>
    
    			<div style="" id="travel_modes_div" class="dir-tm kd-buttonbar">
    				<a tabindex="3" class="kd-button kd-button-left selected" href="javascript:void(0)" id="dir_d_btn" title="By car">
    					<img class="dir-tm-d" src="https:///wp-content/plugins/comprehensive-google-map-plugin/assets/css/images/transparent.png" />
    				</a>
    				<a tabindex="3" class="kd-button kd-button-right" href="javascript:void(0)" id="dir_w_btn" title="Walking">
    					<img class="dir-tm-w" src="https:///wp-content/plugins/comprehensive-google-map-plugin/assets/css/images/transparent.png">
    				</a>
    			</div>
    			<div class="dir-clear"></div>
    			<div id="dir_wps">
    				<div id="dir_wp_0" class="dir-wp">
    					<div class="dir-wp-hl">
    						<div id="dir_m_0" class="dir-m" style="cursor: -moz-grab;">
    							<div style="width: 24px; height: 24px; overflow: hidden; position: relative;">
    								<img style="position: absolute; left: 0px; top: -141px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="https:///wp-content/plugins/comprehensive-google-map-plugin/assets/css/images/directions.png">
    							</div>
    						</div>
    						<div class="dir-input">
    							<div class="kd-input-text-wrp">
    								<input type="text" maxlength="2048" tabindex="4" value="" name="a_address" id="a_address" title="Start address" class="wp kd-input-text" autocomplete="off" autocorrect="off">
    							</div>
    						</div>
    					</div>
    				</div>
    				<div class="dir-rev-wrapper">
    					<div id="dir_rev" title="Get reverse directions">
    						<a id="reverse-btn" href="javascript:void(0)" class="kd-button">
    							<img class="dir-reverse" src="https:///wp-content/plugins/comprehensive-google-map-plugin/assets/css/images/transparent.png">
    						</a>
    					</div>
    				</div>
    				<div id="dir_wp_1" class="dir-wp">
    					<div class="dir-wp-hl">
    						<div id="dir_m_1" class="dir-m" style="cursor: -moz-grab;">
    							<div style="width: 24px; height: 24px; overflow: hidden; position: relative;">
    								<img style="position: absolute; left: 0px; top: -72px; -moz-user-select: none; border: 0px none; padding: 0px; margin: 0px;" src="https:///wp-content/plugins/comprehensive-google-map-plugin/assets/css/images/directions.png">
    							</div>
    						</div>
    						<div class="dir-input">
    							<div class="kd-input-text-wrp">
    								<input type="text" maxlength="2048" tabindex="4" value="" name="b_address" id="b_address" title="End address" class="wp kd-input-text" autocomplete="off" autocorrect="off">
    							</div>
    						</div>
    					</div>
    				</div>
    			</div>
    			<div id="dir_controls">
    				<div class="d_links">
    					<span id="d_options_toggle">
    						<a id="d_options_show" class="no-wrap" href="javascript:void(0)" style="display: none !important;">Show options</a>
    						<a id="d_options_hide" class="no-wrap" href="javascript:void(0)" style="display: none !important;">Hide options</a>
    					   	<b><span style="color: blue">Additional options</span></b>
    					</span>
    				</div>
    				<div id="d_options" style="margin-bottom: 5px; text-align: left;">
    					<input type="checkbox" tabindex="5" name="3d2e8c9b8886a331761c647d49330026_avoid_hway" id="3d2e8c9b8886a331761c647d49330026_avoid_hway" />
    					<label for="3d2e8c9b8886a331761c647d49330026_avoid_hway">Avoid highways</label>
    					<input type="checkbox" tabindex="5" name="3d2e8c9b8886a331761c647d49330026_avoid_tolls" id="3d2e8c9b8886a331761c647d49330026_avoid_tolls" />
    					<label for="3d2e8c9b8886a331761c647d49330026_avoid_tolls">Avoid tolls</label>
    					<input type="radio" name="3d2e8c9b8886a331761c647d49330026_travel_mode" id="3d2e8c9b8886a331761c647d49330026_radio_km" />
    					<label for="3d2e8c9b8886a331761c647d49330026_radio_km">KM</label>
    					<input type="radio" name="3d2e8c9b8886a331761c647d49330026_travel_mode" id="3d2e8c9b8886a331761c647d49330026_radio_miles" checked="checked" />
    					<label for="3d2e8c9b8886a331761c647d49330026_radio_miles">Miles</label>
    				</div>
    				<div class="dir-sub-cntn">
    					<button tabindex="6" name="btnG" type="submit" id="d_sub" class="kd-button kd-button-submit">Get Directions</button>
    					<button tabindex="6" name="btnG" type="button" style="display: none;" id="print_sub" class="kd-button kd-button-submit">Print Directions</button>
    				</div>
    			</div>
    		</div>
    		<div id="rendered-directions-placeholder-3d2e8c9b8886a331761c647d49330026" style="display: none; border: 1px solid #ddd; width: 350px; margin-top: 10px; direction: ltr; overflow: auto; height: 180px; padding: 5px;" class="rendered-directions-placeholder"></div>
    	</div>
    <object id='for-mapid-3d2e8c9b8886a331761c647d49330026' name='for-mapid-3d2e8c9b8886a331761c647d49330026' class='cgmp-data-placeholder cgmp-json-string-placeholder'><param id='json-string-for-mapid-3d2e8c9b8886a331761c647d49330026' name='json-string-for-mapid-3d2e8c9b8886a331761c647d49330026' value='{"shortcodeid":"5982d73b","zoom":"12","width":"350","height":"335","maptype":"roadmap","maptypecontrol":"false","pancontrol":"true","zoomcontrol":"true","scalecontrol":"true","streetviewcontrol":"true","scrollwheelcontrol":"false","showbike":"false","styles":"","bubbleautopan":"true","distanceunits":"miles","showtraffic":"false","showpanoramio":"false","kml":"","directionhint":"false","mapalign":"center","panoramiouid":"","enablegeolocationmarker":"false","addmarkermashup":"false","language":"default","poweredby":"false","draggable":"true","tiltfourtyfive":"false","addmarkermashupbubble":"false","debug":{"shortcodeid":"5982d73b","post_id":2672,"post_type":"page","state":"fresh","since":1388802378},"id":"3d2e8c9b8886a331761c647d49330026","markerlist":"<?php echo $exp_address; ?> <?php echo $exp_city; ?>, <?php echo $exp_state; ?> <?php echo $exp_zip; ?>{}place-icon.png{}No description provided{}REVALIDATE<?php query_posts( array('post_type' => 'experiences','post__not_in' => array( $post_id ),'posts_per_page' => '10','meta_query' => array(array('key' => 'experience_type_dine','value' => '1','compare' => '=','type' => 'numeric'),array('key' => 'experience-city','value' => $exp_city,'compare' => '=')))); ?><?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?><?php $exp_lat = get_post_meta($post->ID, 'experience-latitude', true); if ($exp_lat) { ?><?php } ?><?php $exp_long = get_post_meta($post->ID, 'experiencelongitude', true); if ($exp_long) { ?><?php } ?><?php $exp_address = get_post_meta($post->ID, 'experience-address', true); if ($exp_address) { ?><?php } ?><?php $exp_city = get_post_meta($post->ID, 'experience-city', true); if ($exp_city) { ?><?php } ?><?php $exp_state = get_post_meta($post->ID, 'experience-state', true); if ($exp_state) { ?><?php } ?><?php $exp_zip = get_post_meta($post->ID, 'experience-zip', true); if ($exp_zip) { ?><?php } ?>|<?php echo $exp_address; ?>, <?php echo $exp_city; ?>, <?php echo $exp_state; ?> <?php echo $exp_zip; ?>{}dine-icon.png{}No description provided{}REVALIDATE<?php endwhile; ?><?php endif; ?><?php wp_reset_query(); ?><?php query_posts( array('post_type' => 'experiences','post__not_in' => array( $post_id ),'posts_per_page' => '10','meta_query' => array(array('key' => 'experience_type_shop','value' => '1','compare' => '=','type' => 'numeric'),array('key' => 'experience-city','value' => $exp_city,'compare' => '=')))); ?><?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?><?php $exp_lat = get_post_meta($post->ID, 'experience-latitude', true); if ($exp_lat) { ?><?php } ?><?php $exp_long = get_post_meta($post->ID, 'experiencelongitude', true); if ($exp_long) { ?><?php } ?><?php $exp_address = get_post_meta($post->ID, 'experience-address', true); if ($exp_address) { ?><?php } ?><?php $exp_city = get_post_meta($post->ID, 'experience-city', true); if ($exp_city) { ?><?php } ?><?php $exp_state = get_post_meta($post->ID, 'experience-state', true); if ($exp_state) { ?><?php } ?><?php $exp_zip = get_post_meta($post->ID, 'experience-zip', true); if ($exp_zip) { ?><?php } ?>|<?php echo $exp_address; ?>, <?php echo $exp_city; ?>, <?php echo $exp_state; ?> <?php echo $exp_zip; ?>{}shop-icon.png{}No description provided{}REVALIDATE<?php endwhile; ?><?php endif; ?><?php wp_reset_query(); ?><?php query_posts( array('post_type' => 'experiences','post__not_in' => array( $post_id ),'posts_per_page' => '10','meta_query' => array(array('key' => 'experience_type_see','value' => '1','compare' => '=','type' => 'numeric'),array('key' => 'experience-city','value' => $exp_city,'compare' => '=')))); ?><?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?><?php $exp_lat = get_post_meta($post->ID, 'experience-latitude', true); if ($exp_lat) { ?><?php } ?><?php $exp_long = get_post_meta($post->ID, 'experiencelongitude', true); if ($exp_long) { ?><?php } ?><?php $exp_address = get_post_meta($post->ID, 'experience-address', true); if ($exp_address) { ?><?php } ?><?php $exp_city = get_post_meta($post->ID, 'experience-city', true); if ($exp_city) { ?><?php } ?><?php $exp_state = get_post_meta($post->ID, 'experience-state', true); if ($exp_state) { ?><?php } ?><?php $exp_zip = get_post_meta($post->ID, 'experience-zip', true); if ($exp_zip) { ?><?php } ?>|<?php echo $exp_address; ?>, <?php echo $exp_city; ?>, <?php echo $exp_state; ?> <?php echo $exp_zip; ?>{}see-icon.png{}No description provided{}REVALIDATE<?php endwhile; ?><?php endif; ?><?php wp_reset_query(); ?><?php query_posts( array('post_type' => 'experiences','post__not_in' => array( $post_id ),'posts_per_page' => '10','meta_query' => array(array('key' => 'experience_type_play','value' => '1','compare' => '=','type' => 'numeric'),array('key' => 'experience-city','value' => $exp_city,'compare' => '=')))); ?><?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?><?php $exp_lat = get_post_meta($post->ID, 'experience-latitude', true); if ($exp_lat) { ?><?php } ?><?php $exp_long = get_post_meta($post->ID, 'experiencelongitude', true); if ($exp_long) { ?><?php } ?><?php $exp_address = get_post_meta($post->ID, 'experience-address', true); if ($exp_address) { ?><?php } ?><?php $exp_city = get_post_meta($post->ID, 'experience-city', true); if ($exp_city) { ?><?php } ?><?php $exp_state = get_post_meta($post->ID, 'experience-state', true); if ($exp_state) { ?><?php } ?><?php $exp_zip = get_post_meta($post->ID, 'experience-zip', true); if ($exp_zip) { ?><?php } ?>|<?php echo $exp_address; ?>, <?php echo $exp_city; ?>, <?php echo $exp_state; ?> <?php echo $exp_zip; ?>{}play-icon.png{}No description provided{}REVALIDATE<?php endwhile; ?><?php endif; ?><?php wp_reset_query(); ?><?php query_posts( array('post_type' => 'experiences','post__not_in' => array( $post_id ),'posts_per_page' => '10','meta_query' => array(array('key' => 'experience_type_learn','value' => '1','compare' => '=','type' => 'numeric'),array('key' => 'experience-city','value' => $exp_city,'compare' => '=')))); ?><?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?><?php $exp_lat = get_post_meta($post->ID, 'experience-latitude', true); if ($exp_lat) { ?><?php } ?><?php $exp_long = get_post_meta($post->ID, 'experiencelongitude', true); if ($exp_long) { ?><?php } ?><?php $exp_address = get_post_meta($post->ID, 'experience-address', true); if ($exp_address) { ?><?php } ?><?php $exp_city = get_post_meta($post->ID, 'experience-city', true); if ($exp_city) { ?><?php } ?><?php $exp_state = get_post_meta($post->ID, 'experience-state', true); if ($exp_state) { ?><?php } ?><?php $exp_zip = get_post_meta($post->ID, 'experience-zip', true); if ($exp_zip) { ?><?php } ?>|<?php echo $exp_address; ?>, <?php echo $exp_city; ?>, <?php echo $exp_state; ?> <?php echo $exp_zip; ?>{}learn-icon.png{}No description provided{}REVALIDATE<?php endwhile; ?><?php endif; ?><?php wp_reset_query(); ?>"}' /></object>
    <script type='text/javascript'>CGMPGlobal.language = 'en';</script>
    
    <!-- END MAP -->
    
    <script type='text/javascript' src='https://www.google.com/jsapi?ver=3.7.1'></script>
    <script type='text/javascript' src='https:///wp-content/plugins/comprehensive-google-map-plugin/assets/js/cgmp.framework.min.js?ver=9.0.18'></script>

    And here’s the output from the Settings and Support Section:

    Environment

    PHP v5.3.27
    MySQL v5.1.67-rel14.3-log
    WordPress

    WordPress v3.7.1
    Comprehensive Google Map Plugin v9.0.18
    Theme: UP2 2013, v1.5
    Published posts: 1
    Published pages: 36
    Published acfs: 24
    Published awqsfs: 1
    Published experiencess: 210
    Published mapss: 1
    Published nav_menu_items: 3
    Published placess: 6
    Published sm-locations: 2
    JavaScript

    jQuery v1.10.2
    jQuery Core v1.10.2
    jQuery UI Core v1.10.3
    jQuery Migrate v1.2.1
    Plugins known to modify global WordPress query

    Advanced Category Excluder plugin: Not installed
    Category Excluder plugin: Not installed
    Simply Exclude plugin: Not installed
    Ultimate Category Excluder plugin: Not installed

    I just tried inserting a saved shortcode into a post to get a short code ID, and then placed the shortcode ID into the markup below, but it didn’t make a difference.

    Otherwise, if hardcoding the generated markup into the page template and creating a loop out of it isn’t the right way to go about it, how do you suggest I do it, so I could have dynamically generated maps? We can’t manually generate a map for every “Experience” (which is a custom post type) on the site.

    Thanks again for your help…

    @alexanderzagniotov

    I’m using version 9.0.18. The problem is, after the map finally appears, the pins slowly populate…it can take several minutes for them all to appear. Here’s an example–please wait for the different colored marker icons to appear on the map:

    https://tinyurl.com/lefgz6q

    (I used a TinyURL to prevent Google from indexing this page when people search for the actual site.)

    Also, I should note that I took the markup that the plugin normally generates and placed it in my template so that I could integrate it with a loop to dynamically generate the map. I haven’t tried entering 100 locations in the short code generator to see if it makes a difference, but I don’t see how it would.

    Thanks for the help!

    Could you please share the solution that you sent chrissytampa? I also have many markers on my map, and it takes up to 1-2 minutes to load all the pins.

    Thanks,
    Wes

    I found a jQuery workaround, but it only works if the short code petition form is also on the same page. In my case, I needed the signature count to show up in a box outside of the form, and to show the remaining signatures in another box. So, I wrote this:

    $(".dk-speakup-signature-count").attr("id","totalsignatures");
    var imgCont = $('.dk-speakup-signature-count span').text();
    document.getElementById('second').innerHTML = imgCont;
    A = imgCont
    B = 500 - A
    document.getElementById('first').innerHTML = B;

    What it’s doing is pulling the contents of .dk-speakup-signature-count and placing it in #second. Then, it’s taking the total signature count and subtracting it from 500 and placing it in #first

    Hope this helps!

    ThinkingLeader, I’m in the same boat–I need another custom field in addition to the one that’s given in the plugin. Did you ever find a solution?

    Hi @carlitoscapote,
    Thanks for getting back to me! I’m using WordPress 3.5.1 and having issues with the Github version; specifically, when I attempt to show the number of signatures a petition has received.

    When I place the shortcode in the body copy, or attempt to use <?php do_shortcode('[signaturecount id="1"]'); ?>, it causes the page to break; as in, the page won’t load any thing past the point of where the signaturecount shortcode is placed.

    I have tried adding your code snippet to both the www.ads-software.com version of the plugin as well and got the same result.

    Any help you can provide would be very appreciated.

    Thanks!

    Not sure if this feature is broken, but I can’t get it to work in ether version: The latest official version of the plugin or the fork that carlitoscapote posted to github. Every time I include the short code, it breaks the page and won’t render anything past the point where the short code is to be displayed.

    Any help would be greatly appreciated–I recommended this plugin to a client based on this information in the discovery phase of the project, and now I’m in a tough position.

    Thanks!

    I agree, I think this plugin would be the best one out there if it supported checkboxes.

    weslebsack

    (@weslebsack)

    This is the page containing the SimpleMap plugin, that leads users to a 404 page when they click the permalink:

    https://weslebsack.com/clients/test-legacy/test/

    Thanks for any help you can offer!

    Thread Starter weslebsack

    (@weslebsack)

    Thanks for the reply, I figured as much. I just wasn’t sure if I could call a function and pass a parameter to output each value.

    Anyone else have experience with this?

    I’m getting sent to a 404 page. Did you ever figure it out?

Viewing 15 replies - 1 through 15 (of 19 total)