sr-npm 1.7.182 → 1.7.184
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/pages/homePage.js +15 -6
package/package.json
CHANGED
package/pages/homePage.js
CHANGED
|
@@ -29,21 +29,30 @@ async function homePageOnReady(_$w,thisObject) {
|
|
|
29
29
|
console.log("items#@#@$$#@#$$$#######");
|
|
30
30
|
const markers = items.items.map(item => {
|
|
31
31
|
const location = item.locationAddress.location;
|
|
32
|
+
const cityName = encodeURIComponent(item.title);
|
|
32
33
|
return {
|
|
33
34
|
location: {
|
|
34
35
|
latitude: location.latitude,
|
|
35
36
|
longitude: location.longitude
|
|
36
37
|
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
linkUrl:linkUrl
|
|
38
|
+
address: item.locationAddress.formatted,
|
|
39
|
+
description: `View ${item.count} Open Positions in ${item.title}`,
|
|
40
|
+
title: item.title,
|
|
41
|
+
cityName: item.title, // Store city name for click handler
|
|
42
|
+
_id: item._id
|
|
43
43
|
};
|
|
44
44
|
});
|
|
45
45
|
//@ts-ignore
|
|
46
46
|
_$w('#googleMaps').setMarkers(markers);
|
|
47
|
+
|
|
48
|
+
// Add click handler for map markers
|
|
49
|
+
_$w('#googleMaps').onMarkerClick((event) => {
|
|
50
|
+
const marker = event.marker;
|
|
51
|
+
if (marker.cityName) {
|
|
52
|
+
const cityName = encodeURIComponent(marker.cityName);
|
|
53
|
+
location.to(`/positions?keyWord=${cityName}`);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
47
56
|
});
|
|
48
57
|
}
|
|
49
58
|
|