jqGrid Example
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/base/jquery-ui.css">
<link rel="stylesheet" href="http://trirand.com/blog/jqgrid/themes/ui.jqgrid.css">
<script src="http://trirand.com/blog/jqgrid/js/i18n/grid.locale-en.js"></script>
<script src="http://trirand.com/blog/jqgrid/js/jquery.jqGrid.min.js"></script>
<script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU"></script>
<table id="list"></table>
<div id="pager"></div>
<div id="map"></div>
CSS
html, body, #map {
width: 100%; height: 100%; padding: 0; margin: 0;
}
JavaScript
var myData = [{
id: 1,
name: "aaz"
}, {
id: 2,
name: "bbz"
}, {
id: 3,
name: "ccz"
}, ];
$("#list").jqGrid({
datatype: "local",
colNames: ["Id", "Name"],
colModel: [{
name: "id",
index: "id",
sorttype: "int"
}, {
name: "name",
index: "name"
}],
caption: "Viz Test",
pager: '#pager',
search: true,
data: myData,
beforeSelectRow: function (rowid) {
objectManager.add(data2);
return true;
}
});
var data = {
"type": "FeatureCollection",
"features": [
{"type": "Feature", "id": 0, "geometry": {"type": "Point", "coordinates": [55.831903, 37.411961]}, "properties": {"balloonContent": "Содержимое балуна", "clusterCaption": "Еще одна метка", "hintContent": "Текст подсказки"}},
{"type": "Feature", "id": 1, "geometry": {"type": "Point", "coordinates": [55.763338, 37.565466]}, "properties": {"balloonContent": "Содержимое балуна", "clusterCaption": "Еще одна метка", "hintContent": "Текст подсказки"}},
{"type": "Feature", "id": 2, "geometry": {"type": "Point", "coordinates": [55.763338, 37.565466]}, "properties": {"balloonContent": "Содержимое балуна", "clusterCaption": "Еще одна метка", "hintContent": "Текст подсказки"}},
{"type": "Feature", "id": 3, "geometry": {"type": "Point", "coordinates": [55.744522, 37.616378]}, "properties": {"balloonContent": "Содержимое балуна", "clusterCaption": "Еще одна метка", "hintContent": "Текст подсказки"}},
{"type": "Feature", "id": 4, "geometry": {"type": "Point", "coordinates": [55.780898, 37.642889]}, "properties": {"balloonContent": "Содержимое балуна", "clusterCaption": "Еще одна метка", "hintContent": "Текст подсказки"}}
]
};
var data2 = {
"type": "FeatureCollection",
"features": [
{"type": "Feature", "id": 0, "geometry": {"type": "Point", "coordinates": [55.831903, 37.411961]}, "properties":...