Newbie question: in the following code example...

[map baselayers="osm" extent="68.774414,11.381836,123.662109,34.628906" layers="1,2" 1="kml|http://openlayers.org/dev/examples/kml/sundials.kml|Sundials"
2="kml|http://code.google.com/intl/nl/apis/kml/documentation/KML_Samples.kml|KML Samples"
width="660" height="400"/]

what should I write to get the overlay layers 1,2 disabled/unchecked by default?
Thanks.

CommentFileSizeAuthor
#2 original.png338.24 KBylebec
#2 visibility_false.png276.27 KBylebec
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jpulles’s picture

Category: feature » support

A code like

[map baselayers="osm" extent="68.774414,11.381836,123.662109,34.628906" layers="1,2" 1="kml|http://openlayers.org/dev/examples/kml/sundials.kml|Sundials"
2="kml|http://code.google.com/intl/nl/apis/kml/documentation/KML_Samples.kml|KML Samples|visibility=false"
width="660" height="400"/]

would make the second layer invisible by default.

Regards,
John

ylebec’s picture

FileSize
276.27 KB
338.24 KB

Thanks for the quick reply John,

but the code modified also the appearance of the lines and points, as I show you in the attached files. ¿Is there any way to fix this?
by the way... in order to learn about the mapping kit code, where should I start looking for? html? php?... I'm a total beginner with programming and I feel embarrassed about asking such stupid questions.

jpulles’s picture

You can get the right appearance by using '|visibility=false,extractAttributes=true,extractStyles=true' instead of only the visibility.
By the way, the mapping kit code is mainly php that generates some javascript/html to interact with the javascript OpenLayers library.

ylebec’s picture

Thank you so much.
It worked perfectly.

jpulles’s picture

Status: Active » Closed (fixed)