javascript - Hiding Carto Sql Api Key? -
currently loading carto table containing polyogns map on php file using catro.js , key visible in javascript. example given below call sql api.
var layerstyle = $('#landuse-style').text(); cartodb.createlayer(cartodblib.map, { user_name: 'sandyjones', type: 'cartodb', sublayers: [{ sql: "select * master " + query, cartocss: layerstyle, }], extra_params: { map_key: "myapikey" } }
how hide api key on server using proxy php file or backend php file if can suggest code example can use.
sometime tried stuck problem in url of images carto server contain map key.
wiki
Comments
Post a Comment