jquery.ui.maps上的多个标记
我试图在jquery映射上添加多个标记,但没有成功:jquery.ui.maps上的多个标记,jquery,google-maps,maps,Jquery,Google Maps,Maps,我试图在jquery映射上添加多个标记,但没有成功: <script type="text/javascript" src="js/jquery.ui.map.js"></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script> <script> //<![CDATA[ $('#
<script type="text/javascript" src="js/jquery.ui.map.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script>
//<![CDATA[
$('#googlemaps').gmap({'center': '44.639391, -63.672101', 'zoom': 10, 'disableDefaultUI':true, 'callback': function() {
var self = this;
self.addMarker({'position': this.get('map').getCenter() }).click(function() {
self.openInfoWindow({ 'content': 'Company Name' }, this);
});
}});
//]]>
</script>
//
已解决:
$('#googlemaps').gmap({'center': 'your first coords', 'zoom': 10, 'disableDefaultUI':true, 'callback': function() {
var self = this;
self.addMarker({'position': this.get('map').getCenter() }).click(function() {
self.openInfoWindow({ 'content': 'Your 1st Marker Name' }, this);
});
self.addMarker({'position': 'your second coords' }).click(function() {
self.openInfoWindow({ 'content': 'Your 2nd Marker Name' }, this);
});
}});
需要更多信息来确定问题。