google maps api 3 - One FusionTableLayer appears to be competing with another -


i have google map 2 fusion table layers, 1 markers , 1 polygons. if display both layers no styling, show up. if style markers, both show up. but, when try style polygons, markers don't show up. i'm out of ideas.

// initialize first layer     var firstlayer = new google.maps.fusiontableslayer({         query: {             select: "'geometry'",             from: '1eiyhdpl-5xno7-cswgdrxxyhgfwrljn0jadix9o'         },         styles: [{             where: "'abortions' < 100",             polygonoptions: {                 fillcolor: '#cc0000',                 fillopacity: 0.2             }         },{             where: "'abortions' > 100 , 'abortions' < 1000",             polygonoptions: {                 fillcolor: '#cc0000',                 fillopacity: 0.4             }         },{             where: "'abortions' > 1000 , 'abortions' < 10000",             polygonoptions: {                 fillcolor: '#cc0000',                 fillopacity: 0.6             }         },{             where: "'abortions' > 10000 , 'abortions' < 100000",             polygonoptions: {                 fillcolor: '#cc0000',                 fillopacity: 0.8             }         }],         map: map,         suppressinfowindows: true     });      // initialize second layer         var secondlayer = new google.maps.fusiontableslayer({         query: {         select: "'address'",             from: '1j7ogamqx3pxfig0eh1ah0givle_thze-obgvqho'         },         styles: [{          where: "rank = 1",             markeroptions: {             iconname: 'small_green'            }         },{              where: "rank = 0",                 markeroptions: {                     iconname: 'small_blue'                 }         }],           map: map,         suppressinfowindows: true     }); 

if delete or comment styles firstlayer, styled markers secondlayer there. they're on top of default red polygons firstlayer. firstlayer styles, markers secondlayer disappear.

thanks!

you can style 1 fusiontableslayer on map.

https://developers.google.com/maps/documentation/javascript/layers#fusion_table_styles

styles can applied single fusion tables layer per map. may apply 5 styles layer.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -