graphxks VIP
Total posts: 68
25 Июнь 2014 18:26

I have set up parent/child relationships between a location and a collection that includes that location. The collection view sucessfully shows the children locations on a map view, but the map view on the child page is now blank. (White box in lower right in attached image is where map used to display)

Please advise. Thanks!

Screen Shot 2014-06-25 at 2.19.13 PM

Последние изменения: 27 Июнь 2014


Sergey
Total posts: 13,748
25 Июнь 2014 23:38

Hard to say like this. I have to look into concole if there are JS errors.


Konstantin
Total posts: 1,113
26 Июнь 2014 12:02

You have an error in this line:

jQuery('#map_canvas_22_39').css({height: '100%', width:'100%',margin-top:'0'});

Put margin-top in quote too, and than check.


graphxks VIP
Total posts: 68
26 Июнь 2014 14:07

Hi Konstantin,

Not sure I understand. margin-top:'0' the 0 is in qoutes, are you saying the whole setting should be?


graphxks VIP
Total posts: 68
26 Июнь 2014 17:27

Ok, changing the statement Konstantin referenced to in the file components/com_cobalt/fields/geo/tmpl/output/default.php:

jQuery('#map_canvas_id;?>_id;?>').css({height:'100%', width:'100%','margin-top':'0'});

fixes the problem.

Changing margin-top: to margin: without the single quotes also worked. It appears jQuery does not like the - without encasing in quotes.


Sergey
Total posts: 13,748
26 Июнь 2014 22:55

For properties with - in it you can also use camel case syntax.

jQuery('#map_canvas_id').css({height:'100%', width:'100%', marginTop:'0'});

graphxks VIP
Total posts: 68
27 Июнь 2014 02:39

Good to know, thanks Sergey

Работает на Cobalt