Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
google-maps-addon
Advanced tools
Google maps ember addon easy to consume.
ember install:addon google-maps-addon
ember test
ember test --server
{{google-maps-addon
mapOptions=mapOptions
markers=markers
circles=circles
rectangles=rectangles
infoWindows=infoWindows}}
The JSON mapOptions object is used to configure the base settings for the map.
All configuration options in some way relate to the official attributes for Google Maps Options objects.
mapOptions: {
latitude: 'Your latitude',
longitude: 'Your longitude',
zoom: 'Your prefered zooming level',
// Mouse events
click(event) {
// I promise a callback is assured for the particular event so have your code here
// See the "Supported Mouse Events"-section for all events you can add
}
}
The markers
array contains an array of objects with configuration options that map to the MarkerOptions. All map one-to-one to their real options, except the position
. You pass in a latitude
and a longitude
-property instead of a google.maps.LatLng
as position
.
The key
attribute is custom to google-maps-addon
and is used to intelligently diff objects when the markers array changes. All changes applied are all differential. You can update them as much as you can and expect reasonable performance.
markers: [
{
key: 'A unique value that identifies this marker as an entity',
latitude: 'Your marker latitude if empty will takes up the center latitude',
longitude: 'Your marker longitude if empty will takes up the center longitude',
title: 'Your title, if not provided it takes up as empty string',
animation: 'DROP' || 'BOUNCE',
timeout: timeout after the window loads,
icon: 'Specify the path of the icon',
draggable: true,
// Mouse events
click(event) {
// I promise a callback is assured for the particular event so have your code here
// See the "Supported Mouse Events"-section for all events you can add
}
},
{
key: 'A unique value that identifies this marker as an entity',
latitude: 'Your marker latitude if empty will takes up the center latitude',
longitude: 'Your marker longitude if empty will takes up the center longitude',
title: 'Your title, if not provided it takes up as empty string',
animation: 'DROP' || 'BOUNCE',
timeout: timeout after the window loads,
icon: 'Specify the path of the icon',
draggable: true,
// Mouse events
click(event) {
// I promise a callback is assured for the particular event so have your code here
// See the "Supported Mouse Events"-section for all events you can add
}
}
]
The circles
array contains an array of objects with configuration options that map to the CircleOptions. All map one-to-one to their real options, except the position
. You pass in a latitude
and a longitude
-property instead of a google.maps.LatLng
as position
.
The key
attribute is custom to google-maps-addon
and is used to intelligently diff objects when the circles
array changes. All changes applied are all differential. You can update them as much as you can and expect reasonable performance.
circles: [{
key: 'A unique value that identifies this marker as an entity',
radius: 100, // Radius of the circle,
latitude: number, // latitude of the center,
longitude: number, // longitude of the center,
fillColor: color, // fill color
strokeColor: color, // stroke color
// Mouse events
click(event) {
// I promise a callback is assured for the particular event so have your code here
// See the "Supported Mouse Events"-section for all events you can add
}
// More options at https://developers.google.com/maps/documentation/javascript/reference#CircleOptions
}]
The rectangles
array contains an array of objects with configuration options that map to the RectangleOptions. All map one-to-one to their real options. (Even the bounds
-object)
The key
attribute is custom to google-maps-addon
and is used to intelligently diff objects when the rectangles
array changes. All changes applied are all differential. You can update them as much as you can and expect reasonable performance.
rectangles: [{
bounds: {
northEast: number,
southWest: number
},
fillColor: color,
fillOpacity: float,
click(event) {
// I promise a callback is assured for the particular event so have your code here
// See the "Supported Mouse Events"-section for all events you can add
}
// More options at https://developers.google.com/maps/documentation/javascript/reference#RectangleOptions
}]
The infoWindows
array contains an array of objects with configuration options that map to the InfoWindowOptions. All map one-to-one to their real options, except the position
. You pass in a latitude
and a longitude
-property instead of a google.maps.LatLng
as position
.
The key
attribute is custom to google-maps-addon
and is used to intelligently diff objects when the infoWindow
array changes. All changes applied are all differential. You can update them as much as you can and expect reasonable performance.
infoWindows: [{
key: 'my-window',
content: 'Your HTML content here',
latitude: 'Your info window latitude if empty will takes up the center latitude',
longitude: 'Your info window longitude if empty will takes up the center longitude',
maxWidth: 'The maximum width of the info window' //in number
pixelOffset: 'The offset, in pixels, of the tip of the info window from the point on the map at whose geographical coordinates the info window is anchored. If an InfoWindow is opened with an anchor, the pixelOffset will be calculated from the anchors anchorPoint property.'
// More options at https://developers.google.com/maps/documentation/javascript/reference#InfoWindowOptions
}]
'click',
'dblclick',
'drag',
'dragend',
'dragstart',
'mousemove',
'mouseout',
'mouseover',
'rightclick'
Feel free to raise an issue or feature request.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)More info window support (events, adding it to markers)
Need more interactions back into the component than getting out of component
google-maps-addon is MIT Licensed.
FAQs
Google maps Ember addon easy to consume
We found that google-maps-addon demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.