New home › Forums › Pro Add-on › Remove 'miles away'
Tagged: css, display, infoWindow, miles
- This topic has 5 replies, 2 voices, and was last updated 7 years, 8 months ago by mitchcan.
-
AuthorPosts
-
May 14, 2015 at 3:39 am #13440mitchcanMember
I’d like to remove the “x miles away” from display in the infowindow of a Marker.
I tried doing so with some simple display:none css, but that didn’t work, as I could not target just the p for the miles, it took out everything in the window.
I saw the specifics for the _title and _description, but nothing for the “x miles away.”
Could you let me know how to remove/hide that info in the window?
And if possible, would I then be able to use ‘wpgmza_map_xx’ to target a specific map when doing this?
Thanks.
May 25, 2015 at 9:08 am #13598Nick DuncanKeymasterHi Mitch
This will have to be removed from the code itself. If you open the wp-google-maps-pro/js/core.js file, try looking for this:if (radius !== null) { if (distance_type === "1") { d_string = "<p>"+Math.round(d,2)+' '+wpgmaps_lang_m_away+"</p>"; } else { d_string = "<p>"+Math.round(d,2)+' '+wpgmaps_lang_km_away+"</p>"; } } else { d_string = ''; }
Simply remove that section
June 1, 2015 at 5:23 am #13672mitchcanMemberHey Nick,
I removed this from lines 1724 + and 2152 + in js/core.js but the mileage remains. Then I was thinking, do I need to do something with the core.min.js file also to get this to work? And if so, how do I go about that?
Thanks.
June 1, 2015 at 10:32 am #13739Nick DuncanKeymasterHi Mitch
There’s two sections with the same code in, please remove the other one tooJune 18, 2015 at 8:10 pm #14248mitchcanMemberHey Nick,
I removed both sections around lines 1794 and 2220, to no avail. Do I need to reminify that js? or change the same places in the .min file too? to get this to work?
Thanks.
July 17, 2015 at 12:02 am #14868mitchcanMemberHey Nick,
Can I hit you up on this one again? I never have got the format you referenced to work. You mentioned that you were going to look at an easier way to do this. I would have been happy just to CSS display:none the thing and call it good, but that doesn’t work either.
I know its an edge use case, so I appreciate your help.
Thanks and have a great day.
-
AuthorPosts
- The topic ‘Remove 'miles away'’ is closed to new replies.