Customize Info Bubble
-
Hi Alexander
I want to customize the info bubble like follows
Listing /Post Name (clickable)
Review ratings (stars)
AddressCan you tell me where should be i looking to do so?
thanks!
-
Hi kais12,
It is not possible at the moment through settings or options. If you want to start poking around the JS, you need to look into cgmp.framework.js (which respectively should be minified to cgmp.framework.min.js)
I hope this helps
Thanks Alex
I will play with the said files and see what transpires .Hey Alexander
i’m sorry to inform, but i can’t see this working
bubble += "<p class='geo-mashup-post-title'><a title='Original post: " + markersElement.postTitle + "' href='" + markersElement.postLink + "'>" + substr + "..</a></p>";all i get are the two dots .
thanks!
I need more information, what are you trying to modify… the code that you showed me is executed when the map is configured as a Gep mashup… so the “substr” is:
var substr = markersElement.postTitle.substring(0, 30);i want to show the custom post title above Address.
Are you using Geomashup option?
You still did not tell me what you are trying to modify in JS.
The plugin does not inject post title information to the client side, unless the map is configured as a geomashup and you selected the option “linked title to the original post/page and the latter’s excerpt”.
Only in the above case, post title will be available in JS, which can allow you to poke around. For all other custom modifications to make sure that your JS has access to required data, you need to modify server side plugin code.
Yes i am using .
My code is like follows
echo do_shortcode ('[google-map-v3 width="100%" height="500" zoom="12" maptype="roadmap" mapalign="center" directionhint="true" language="default" tiltfourtyfive="false" maptypecontrol="true" pancontrol="true" zoomcontrol="true" scalecontrol="true" streetviewcontrol="true" scrollwheelcontrol="false" draggable="true" enablegeolocationmarker="true" enablemarkerclustering="false" addmarkermashupbubble="false" addmarkermashupbubble="false" addmarkerlist="'.$mark_final.'{}1-default.png{}" bubbleautopan="true" distanceunits="miles" showbike="false" showtraffic="false" showpanoramio="false"]');as ya see addmarkerlist is an array of addresses separated by | .
It all works great, every thing and feature but i can’t show post title on top of the address in bubble.What is the value of
$mark_final?Look, the post title is not going to magically appear in the JS. You need to pass this data back to the client side. Then, you need to make sure that the JS knows how to parse the data you are passing.
do ya want to say that addmarkerlist=”‘.$mark_final.'{}1-default.png{}Post_Title” is correct format?
$mark_final is like this
3155 1/2 CY AVE CASPER , WY 82604|1708 East Grand Avenue Laramie , WY 82070|1695 SUNSET DR #104 ROCK SPRING , WY 82901|128 YELLOW CREEK CENTER EVANSTON , WY 82930|120 S 3rd Street E Riverton , WY 82501|1708 East Grand Avenue Laramie , WY 82070i am not creating a map for each post , but grabbing the post addresslike follows
$full_add=implode(' ', array($street,$city,',', $state, $zip));
and then passing it to mark_final array with pipe | char in b/w two addresses and the using mashup to show the map.I think you need to understand how ” addmarkerlist” gets parsed by JS. How the piped string gets broken down to individual pieces. Once you got that part, you can figure it out where post title should be attached
The topic ‘Customize Info Bubble’ is closed to new replies.