Circle directive issue
Good day Nicolas
Thank you for a great angular library for google maps first of all, I enjoy using it. I was struggling to get Google Maps to display a circle on the map and see you added a directive to do it. I tried using it, but the circle will not display, am I missing a plugin or is there an issue in version ~1.0.16?
Code as follow:
In controller:
$scope.circleObjects = [
{
id: 1,
center: {
latitude: -27.7,
longitude: 23.05
},
radius: 5000,
stroke: {
color: '#08B21F',
weight: 2,
opacity: 1
},
fill: {
color: '#08B21F',
opacity: 0.5
},
geodesic: true, // optional: defaults to false
draggable: true, // optional: defaults to false
clickable: true, // optional: defaults to true
editable: true, // optional: defaults to false
visible: true // optional: defaults to true
}];
And in my HTML:
<div class="google-map" center="mapObjects.center" zoom="mapObjects.zoom" draggable="true" options="mapObjects.options" control="mapObjects.control" events="mapObjects.events">
<markers ng-if="mapObjects.markers.length > 0" models="mapObjects.markers" coords="'self'" icon="'icon'" click="'onClicked'" labelContent="'title'" labelAnchor="4 2" labelClass="marker-labels" fit="true"></markers>
<window coords="window.coordinates" show="window.show" options="window.options" templateUrl="window.templateUrl" templateParameter="window.templateParameter"></window>
<circle ng-repeat="circleObject in circleObjects track by circleObject.id" center="circleObject.center" stroke="circleObject.stroke" fill="circleObject.fill" radius="circleObject.radius" visible="circleObject.visible" geodesic="circleObject.geodesic" editable="circleObject.editable" draggable="circleObject.draggable" clickable="circleObject.clickable"></circle>
</div>
I don't immediately see anything wrong, but I recommend updating to v1.1 and studying the circle example in examples directory. It is working. On Jun 9, 2014 1:10 AM, "MauritzKruger" [email protected] wrote:
Good day Nicolas
Thank you for a great angular library for google maps first of all, I enjoy using it. I was struggling to get Google Maps to display a circle on the map and see you added a directive to do it. I tried using it, but the circle will not display, am I missing a plugin or is there an issue in version ~1.0.16?
Code as follow: In controller:
$scope.circleObjects = [ { id: 1, center: { latitude: -27.7, longitude: 23.05 }, radius: 5000, stroke: { color: '#08B21F', weight: 2, opacity: 1 }, fill: { color: '#08B21F', opacity: 0.5 }, geodesic: true, // optional: defaults to false draggable: true, // optional: defaults to false clickable: true, // optional: defaults to true editable: true, // optional: defaults to false visible: true // optional: defaults to true }];
And in my HTML:
— Reply to this email directly or view it on GitHub https://github.com/nlaplante/angular-google-maps/issues/480.
Thank you Rick, updated my version, don't now why bower update didn't update it on previous run, and everything working now... Thanks again...