在地图上添加标记,自定义标记信息窗口,如下:
var html = [];
html.push('<span style="font-size:12px">添加标记: </span><br/>');
html.push('<table border="0" cellpadding="1" cellspacing="1" >');
html.push(' <tr>');
html.push(' <td align="left">名 称:</td>');
html.push(' <td colspan="2"><input type="text" maxlength="50" size="18" id="txtName"></td>');
html.push(' <td valign="top"><span class="star">*</span></td>');
html.push(' </tr>');
html.push(' <tr>');
html.push(' <td align="left">备 注:</td>');
html.push(' <td colspan="2"><input type="text" maxlength="50" size="18" id="areaDesc" style="width: 100%;height:50px;display: inline-block;"></td>');
html.push(' <td valign="top"></td>');
html.push(' </tr>');
html.push(' <tr>');
html.push(' <td align="center" colspan="3">');
html.push(' <input type="button" name="btnOK" id="OK" onclick="add()" value="确定" /> ');
html.push(' <input type="button" name="btnClear" ng-click="clear()" value="重填" />');
html.push(' </td>');
html.push(' </tr>');
html.push('</table>');
function add() {
console.log("OKOKOKOK");
}
$scope.clear = function() {
console.log("fnClearfnClearfnClearfnClear");
}
定义了两个方法,add()和clear(),但是两个无论如何都不触发什么情况??