Page 1 of 2

Map visibilty issue

Posted: Thu Feb 05, 2015 12:27 am
by Cody Blue

Hello,

As suggested in the thread here (https://getsatisfaction.com/apperyio/...), I had been using

jQuery('[name="googlemap_29"]').css("visibility", "hidden");
jQuery('[name="googlemap_29"]').css("visibility", "visible");

to hide and display maps when I needed to. On checking today (browser, iOS device), the above commands are suddenly failing to achieve desired effect.

Is there a change in Appery causing this? Will appreciate advise of resolution soon as it is breaking the functionality that took us time to build and quite a bit is riding on the use of above JS to hide and display maps.

PS - Use of $('[dsid="googlemap"]').hide() skews markers and all the display within the maps (which are bounded appropriately in JS), so we'd rather not use it . Hope you can help fix the above JS working in Appery.


Map visibilty issue

Posted: Thu Feb 05, 2015 7:31 am
by Evgene Karachevtsev

Hello Cody,

There wasn't to be any changes causing this. Could you please clarify, do you still have this issue?


Map visibilty issue

Posted: Thu Feb 05, 2015 9:56 am
by Cody Blue

I've checked again and yes, I do. As mentioned above, setting "visibility" to "hidden" is no longer effective in hiding the map, when things were working absolutely fine until at the most a few days ago. You might want to consult with Yurii, regarding the JS that was proposed. The problem should reproducible via simple test https://getsatisfaction.com/apperyio/...


Map visibilty issue

Posted: Thu Feb 05, 2015 12:37 pm
by Evgene Karachevtsev

Cody,

Could you please also detail a few things:
1) Have you changed the component name ?
2) Have you tried to debug your project with wienre ?
3) What exactly line of code doesn't work ?


Map visibilty issue

Posted: Thu Feb 05, 2015 3:15 pm
by Cody Blue

Everything has been checked and thoroughly tested. Component name is as it should be. Apologies but this is becoming bit frustrating: I am genuinely reporting a problem you seem to have, and am being countered twice with obvious questions. Again, please reproduce the solution you had suggested on the get-satisfaction link above and you'll see it does not work any longer. I'll appreciate if you can provide a resolution - a suggestion that it will be fixed in two months in the next release won't be helpful to us, as I have indicated a lot of our implementation is riding on this working properly.


Map visibilty issue

Posted: Fri Feb 06, 2015 7:16 am
by Evgene Karachevtsev

Hello Cody,

We checked the code, please use this one
prejQuery('[name="googlemap_29"]').css("display", "none");
jQuery('[name="googlemap_29"]').css("display", "block");/pre


Map visibilty issue

Posted: Fri Feb 06, 2015 6:24 pm
by Cody Blue

Evgeny - thanks the feedback. But this breaks the map display in several ways (the map zoom and boundaries set via latlngbounds in JS are not preserved and the map display shows up skewed). Is there a way you guys can get the "visibility" css property to work again in Appery, as it did before? I have maps in several places of the project which were all working fine till now, and the breakage will warrant rework that will take substantial time.


Map visibilty issue

Posted: Fri Feb 06, 2015 6:46 pm
by M&M

have you tried this method to hide / show the map

// To Hide map
var gmap = Appery("googlemap_16");
gmap.hide();

// To Show map
var gmap = Appery("googlemap_16");
gmap.show();

Hopefully it won't mess with existing zoom / lat lon bounds


Map visibilty issue

Posted: Fri Feb 06, 2015 9:28 pm
by Cody Blue

That doesn't work unfortunately. The zoom and bounds do get distorted as with "display" css solution above. The "visibility" attribute implementation was working well before and I hope the folks can suggest if that can be restored.


Map visibilty issue

Posted: Sat Feb 07, 2015 4:42 am
by M&M

You may want to try another trick while the folks at Appery find a fix:

code
jQuery('[name="googlemap_29"]').css("opacity", "0.0"); // Transparent / Hidden

jQuery('[name="googlemap_29"]').css("opacity", "1.0"); // Opaque / Visible
/code

Technically this should not mess with the markers and stuff

Necessity is the mother of invention :-)