sr-npm 1.7.191 → 1.7.192

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/pages/homePage.js +1 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.191",
3
+ "version": "1.7.192",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/pages/homePage.js CHANGED
@@ -25,11 +25,10 @@ async function homePageOnReady(_$w,thisObject) {
25
25
  const numOfItems = await _$w('#citiesDataset').getTotalCount();
26
26
  const items = await _$w('#citiesDataset').getItems(0, numOfItems);
27
27
  let baseUrl = await location.baseUrl();
28
- const linkUrl = `${baseUrl}/positions`;
29
28
  const markers = items.items.map(item => {
30
29
  const location = item.locationAddress.location;
31
30
  const cityName = encodeURIComponent(item.title); // Use the city name from the item
32
- const cityLinkUrl = `${linkUrl}?keyWord=${cityName}`; // Add city as search parameter
31
+ const cityLinkUrl = `${baseUrl}/positions?location=${cityName}`; // Add city as search parameter
33
32
  return {
34
33
  location: {
35
34
  latitude: location.latitude,
@@ -43,25 +42,6 @@ async function homePageOnReady(_$w,thisObject) {
43
42
  //@ts-ignore
44
43
  _$w('#googleMaps').setMarkers(markers);
45
44
  });
46
- _$w('#googleMaps').onMarkerClicked((event) => {
47
- console.log("event: ", event);
48
-
49
- // Get all markers from the map
50
- const allMarkers = _$w('#googleMaps').markers;
51
- console.log("allMarkers: ", allMarkers);
52
- const getMarker = _$w('#googleMaps').getMarkers();
53
- console.log("getMarker: ", getMarker);
54
-
55
- // Find the clicked marker by matching coordinates
56
- const clickedMarker = allMarkers.find(marker =>
57
- marker.location.latitude === event.location.latitude &&
58
- marker.location.longitude === event.location.longitude
59
- );
60
-
61
- if (clickedMarker && clickedMarker.linkUrl) {
62
- location.to(clickedMarker.linkUrl);
63
- }
64
- });
65
45
  }
66
46
 
67
47
  function init(_$w) {