Commit 02b249a 1 parent ad043f9 commit 02b249a Copy full SHA for 02b249a
File tree 5 files changed +9
-5
lines changed
examples/playground/src/code-samples
5 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
1
// title: PlaceResult using the PlaceMarker class
2
2
3
- import { PlaceMarker } from '@ubilabs/google-maps-marker/placemarker ' ;
3
+ import { PlaceMarker } from '@ubilabs/google-maps-marker/places ' ;
4
4
5
5
export default ( map : google . maps . Map ) => {
6
6
res . forEach ( result => {
Original file line number Diff line number Diff line change 1
1
export * from './marker' ;
2
+ export * from './marker-attributes' ;
2
3
export * from './marker-collection' ;
4
+ export * from './position-formats' ;
3
5
4
6
export * as color from './color' ;
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ export class MapStateObserver {
66
66
const bounds = this . map_ . getBounds ( ) ;
67
67
68
68
if ( ! center || ! bounds ) {
69
- console . error (
69
+ console . debug (
70
70
'MapStateObserver.handleBoundsChange(): map center and/or bounds ' +
71
71
'undefined. Not updating map state.'
72
72
) ;
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ export class Marker<TUserData = unknown> {
63
63
private mapEventListeners_ : google . maps . MapsEventListener [ ] = [ ] ;
64
64
65
65
private data_ : TUserData | null = null ;
66
- private markerState_ : MarkerState = { visible : false , hovered : false } ;
66
+ private markerState_ : MarkerState = { hovered : false } ;
67
67
68
68
/** Attributes set by the user. */
69
69
private readonly attributes_ : Partial < Attributes < TUserData > > = { } ;
@@ -380,6 +380,7 @@ export class Marker<TUserData = unknown> {
380
380
set ( this : Marker , value ) {
381
381
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
382
382
this . attributes_ [ key ] = value ;
383
+ this . update ( ) ;
383
384
}
384
385
} ) ;
385
386
}
@@ -425,7 +426,6 @@ export type MarkerOptions<T> = {
425
426
*/
426
427
export type MarkerState = {
427
428
hovered : boolean ;
428
- visible : boolean ;
429
429
} ;
430
430
431
431
enum MarkerEvents {
Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ export function assertMapsApiLoaded() {
21
21
if ( google . maps && ! google . maps . marker ) {
22
22
console . error (
23
23
`Google Maps API was loaded without the required marker-library. ` +
24
- `To load it, add the '&libraries=marker' parameter to the API url.`
24
+ `To load it, add the '&libraries=marker' parameter to the API url ` +
25
+ `or use \`await google.maps.importLibrary('marker');\` before creating ` +
26
+ `a marker.`
25
27
) ;
26
28
throw new Error ( 'Google Maps Marker Library not found.' ) ;
27
29
}
You can’t perform that action at this time.
0 commit comments