New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-hotels-on-map

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-hotels-on-map - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

20

build/index.js

@@ -33,2 +33,8 @@ 'use strict';

function newInfoWindow(hotel) {
var maps = global.window.google.maps;
return new maps.InfoWindow({ content: (0, _hotelInfoHtml2.default)(hotel) });
}
exports.default = _react2.default.createClass({

@@ -50,4 +56,12 @@ displayName: 'src',

this.map = new maps.Map(this.getDOMNode(), (0, _defaultMapConfiguration2.default)());
this.applyClustering();
},
applyClustering: function applyClustering() {
var maps = global.window.google.maps;
var markers = this.markers();
var markers = this.markers();
if (markers.length === 1) {
maps.event.trigger(markers[0], 'click');
}
var clusterer = new _MarkerClusterer2.default(this.map, markers, { gridSize: 30 });

@@ -61,8 +75,6 @@

return this.props.hotels.map(function (hotel) {
var maps = global.window.google.maps;
var result = (0, _marker2.default)(hotel.geolocation);
var infoWindow = new maps.InfoWindow({ content: (0, _hotelInfoHtml2.default)(hotel) });
result.addListener('click', function () {
infoWindow.open(_this.map, result);
newInfoWindow(hotel).open(_this.map, result);
});

@@ -69,0 +81,0 @@

2

package.json
{
"name": "react-hotels-on-map",
"version": "0.2.0",
"version": "0.3.0",
"description": "Presents a set of hotels as clustered markers on Google Map, each with an info window displaying the hotel summary",

@@ -5,0 +5,0 @@ "main": "build/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc