jawj / OverlappingMarkerSpiderfier

Deals with overlapping markers in Google Maps JS API v3, Google Earth-style
http://blog.mackerron.com
836 stars 238 forks source link

Map.getStreetView() now incurs a usage cost #159

Open soames-sparks opened 6 years ago

soames-sparks commented 6 years ago

Not so much a code issue, but more of a usage issue/caveat. The OverlappingMarkerSpiderfier script calls the Map.getStreetView() method (specifically to ensure markers are not spiderfied in street view), with which Google's new pricing schedule may incur a charge where it would not have done so previously.

See: https://developers.google.com/maps/billing/understanding-cost-of-use#dynamic-street-view

In JavaScript, with the google.maps.StreetViewPanorama() class or Map.getStreetView() method (prior to the new pricing, Map.getStreetView() was not charged). Usage of the StreetViewService() class is not charged.

I haven't checked to see if there's any other quick way to determine whether StreetView is being used without calling getStreetView(), but unless you're specifically using street view (the control is disabled in our case) it should suffice simply to remove the this.map.getStreetView().getVisible() condition.

jawj commented 6 years ago

Huh — interesting. As an interim fix I should maybe put the Street View check behind a constructor option.