hiding a google map with no info added yet

boplive
@boplive
10 years ago
346 posts
Hi there Steve,

I been messing around with the Ujgooglemap and got it to work. Definitely great work you have done with this.
I'm displaying the function in the Nova skin directory on a custom blog and event page.
what I would like to do is only display a google map when a member or artist adds the location info.
.by using the {if} else {\if} function
Right now if there no location info added ..a blank blue google map is showing
And it looks ugly if there a lots of blue maps on the event or blog page
Do you have any idea wht function will work to hide these extra blank boxes.until the location info is added.

i have ther nova skin

this is the link
http://www.spied.me

this in the blogs_row.tpl underneath the tabs
{$item.blog_text|truncate:250:"...":false|jrCore_format_string:$item.profile_quota_id|nl2br}


{ujGoogleMaps_map skin=true module="jrBlog" name="map1" map=$item height="150" width="300" controls="false" marker="infowindow"}


in form designer

my label is called blog_googlemaps label

this is what i have for both blog create and blog update

field: blog_googlemaps

label - blog_googlemaps label

sub label - left blank

help - blog_googlemaps help

type - googlemaps

options- left blank

default- left blank

validation string printable character and html allowed quota

minimum- left blank

maximum -left blank

display groups -quota member

required -checked

active - checked

that about it

Thanks
Ed
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
Try taking out skin=true

I think that should work for you, let me know.

Thanks


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
boplive
@boplive
10 years ago
346 posts
hi Steve,
I took off the skin=true and no luck as you see it now...
the blue or the map doesn't show at all on the page...but you do see the spacing in the first blog which is where there supposed to be a map

{ujGoogleMaps_map module="jrBlog" name="map" map=$item height="150" width="300" controls="false" marker="infowindow"}

i even tried taking out name="map"

{ujGoogleMaps_map module="jrBlog" map=$item height="150" width="300" controls="false" marker="infowindow"}

and it left the spacing on top wher the map showed but also no blue boxes
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
That looks right except the google scripts aren't loading. Can you check the version of ujGooglemaps, and also let me know which version of the core you are running. Also take a look at your error log and see if there is anything in there related to google or googlemaps.

I've compared my local files to the marketplace download and they are identical, so there must be a reason why.

This should work in your list template:
{ujGoogleMaps_map name="itemmap" map=$item module="jrBlog" height="150" width="150"}

Check that there are no other googlemaps calls which might be producing errors.

Also give it a try in a blog item_detail template to see if you can get a map showing anywhere.

It looks like the map javascript for the item is fine, but the script link to google isn't making it into your javascript_href in the head. Are you running an older version of the core?


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 06/03/14 02:04:11AM
boplive
@boplive
10 years ago
346 posts
Hi Steve...I had the latest updated jamroom core before updating to 5.2 last night.

I check and there is no other googlemap call tht may interfere

now it looks like I am up to date with the latest version of ujgooglemap. .but im going to double check and get back to you on that...

theres nothing in the error log related to googlemap

tonight..ill give it a try calling it from blog_item_details and see wht happens

also im going to try a different skin...just to make sure its not the Javascript of the Nova skin tht has conflicts..which I know it shouldnt but who know.

thnx fr ur help
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
It isnt Nova, I've tested on that, and 5.2 was tested this morning.

Is the list row template in the skin dir as well? Or is it the jrBlog template edited in the ACP template editor? Although it looks as though the tpl is doing its job, the script isn't making it into the head.

Thanks


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
boplive
@boplive
10 years ago
346 posts
It's in the list row template in the Nova skin dir - blogs_row.tpl

I try not to use the ACP template editor
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
Ok, I've reproduced the behaviour exactly as seen on your site, so its a bug.

I'll get that sorted out and a new version uploaded later today.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
Theres a new version in the marketplace to fix this so give that a try.

This is what you need in jrNova/blog_row.tpl (inside the foreach):
{ujGoogleMaps_map name="itemmap" map=$item module="jrBlog" height="150" width="300"}

This is a multimap in the same template (outside the foreach):
{ujGoogleMaps_map name="anothermap" map=$_items module="jrBlog" height="150" width="300"}



--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
boplive
@boplive
10 years ago
346 posts
i uploaded the new version and left it with how I had it coded and its working..yayyyyyyyyyyyy... :)

but....I'll switch it out how you mentioned the code above when I get home.

Cheers Steve and as always GREAT WORK!

p.s. looking into getting the LifeStream soon :)
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
Great! Glad to hear that :)

And thanks for your patience with finding that bug, I just made you a marketplace LifeStreams license (let me know if that doesn't show up in the right place/site in your marketplace).


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
boplive
@boplive
10 years ago
346 posts
It showed up...;)

Now how abt me making this payment for it ...hit me up with your paypal

Also is this code below doable with the ujgoogle map just like the genosis module event feature.as um thinking maybe its best to hide them and show only when needed to just in case theres 12 blogs on the page... there not showing 12 maps at one time.unless you click for it.
let me know if you think theres a chance it can work

Show/hide with jQuery

This isn't a difficult thing to do.You need a link or a button (something clickable) and a hidden element. You can initially hide your element using style="display: none;" or set the display to "none" in a css rule and add the classname to the element.
updated by @boplive: 06/06/14 05:06:07PM
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
That was a freebie ;)

You'd want to add your own show/hide in your skin template if that is important for your app.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

Tags