[WIP] Setup of skeleton
This commit is contained in:
21
resources/views/cornford/googlmapper/polygon.blade.php
Normal file
21
resources/views/cornford/googlmapper/polygon.blade.php
Normal file
@@ -0,0 +1,21 @@
|
||||
var polygonCoordinates_{!! $id !!} = [
|
||||
@foreach ($options['coordinates'] as $coordinate)
|
||||
new google.maps.LatLng({!! $coordinate['latitude'] !!}, {!! $coordinate['longitude'] !!}),
|
||||
@endforeach
|
||||
];
|
||||
|
||||
var polygon_{!! $id !!} = new google.maps.Polygon({
|
||||
paths: polygonCoordinates_{!! $id !!},
|
||||
strokeColor: '{!! $options['strokeColor'] !!}',
|
||||
strokeOpacity: {!! $options['strokeOpacity'] !!},
|
||||
strokeWeight: {!! $options['strokeWeight'] !!},
|
||||
fillColor: '{!! $options['fillColor'] !!}',
|
||||
fillOpacity: {!! $options['fillOpacity'] !!},
|
||||
editable: {!! $options['editable'] ? 'true' : 'false' !!}
|
||||
});
|
||||
|
||||
polygon_{!! $id !!}.setMap({!! $options['map'] !!});
|
||||
|
||||
shapes.push({
|
||||
'polygon_{!! $id !!}': polygon_{!! $id !!}
|
||||
});
|
||||
Reference in New Issue
Block a user