Jump to content

Member Map


Recommended Posts

Posted
4 minutes ago, Martin A. said:

Yes, that's correct. What happens if you set it to be an "all day event"?

No luck either. I tried with new all day event, also didn't work.

Posted

Think I know what the issue is, @jair101 and @Edward Shephard. The address you have entered is just a partial one, which is fine for showing the mini map in the event, as you can feed Google with a string to search for. Sadly Member Map can't do that, it needs a set of coordinates.

You can verify this by hovering the mouse over the mini map in the Calendar event. If it looks like this then this is the reason why it's not showing up on your map.

https://maps.google.com/?q=,Siem Reap, Siem Reap, KH

I've made some changes where it'll try to get accurate coordinates when saving the event, but it needs some more testing before I can release it.

Posted

@Martin A. I can confirm that this seems to be the issue. I have included exact address and it was shown on the map. 

For me though it would be great if approximate coordinates can be extracted somehow, but it seems to be working as intended. 

Posted

I tried calling the API and it seems to work with the partial address too:

 https://maps.googleapis.com/maps/api/geocode/json?address= Krong Siem Reap, Siem Reap Province, KH&key=
{
   "results" : [
      {
         "address_components" : [
            {
               "long_name" : "Krong Siem Reap",
               "short_name" : "Krong Siem Reap",
               "types" : [ "locality", "political" ]
            },
            {
               "long_name" : "Siem Reap Province",
               "short_name" : "Siem Reap Province",
               "types" : [ "administrative_area_level_1", "political" ]
            },
            {
               "long_name" : "Cambodia",
               "short_name" : "KH",
               "types" : [ "country", "political" ]
            }
         ],
         "formatted_address" : "Krong Siem Reap, Cambodia",
         "geometry" : {
            "bounds" : {
               "northeast" : {
                  "lat" : 13.4692631,
                  "lng" : 103.9917327
               },
               "southwest" : {
                  "lat" : 13.2114327,
                  "lng" : 103.7341763
               }
            },
            "location" : {
               "lat" : 13.3670968,
               "lng" : 103.8448134
            },
            "location_type" : "APPROXIMATE",
            "viewport" : {
               "northeast" : {
                  "lat" : 13.4692631,
                  "lng" : 103.9917327
               },
               "southwest" : {
                  "lat" : 13.2162611,
                  "lng" : 103.7341763
               }
            }
         },
         "place_id" : "ChIJeaiRjJoWEDER-rvlPvmqQKk",
         "types" : [ "locality", "political" ]
      }
   ],
   "status" : "OK"
}

 

Posted

As an aside I had a support ticket last week about what I think is an omission in the Google render method.  At the moment this doesn't pickup the postcode field:

Quote

I think the 'render' function in /system/GeoLocation/Maps/Google.php line 59:


foreach ( array( 'country', 'region', 'city', 'addressLines' ) as $k )

should be:


foreach ( array( 'country', 'postalCode', 'region', 'city', 'addressLines' ) as $k )

 

ATM if you just enter a postcode in the postcode field it won't render the map, although if you put it in one of the other fields, or include any other data then it will.

Posted
10 hours ago, jair101 said:

I tried calling the API and it seems to work with the partial address too:


 https://maps.googleapis.com/maps/api/geocode/json?address= Krong Siem Reap, Siem Reap Province, KH&key=

 

Yes, a partial address will return coordinates, but IPS doesn't collect one when only a partial address is entered in the address field. And I think the reason is the look of the mini map. A complete address will zoom in more on the target than a partial will. 

And I can't get the coordinate from Google, as the result will be used in a different mapping solution.

Posted
5 minutes ago, jair101 said:

I see. Thanks anyway, I will instruct my members to be as precise with the address as possible. .

12 hours ago, Martin A. said:

I've made some changes where it'll try to get accurate coordinates when saving the event, but it needs some more testing before I can release it.

The next update will fix this.

Posted

Hey Martin, 

Not sure if you have noticed that, but the alpha for 4.1.18 states the following changes:

When a location is specified for a Calendar Event, the address will be shown underneath the map. The map itself should also be more accurate now.

I am just mentioning it as it could potentially affect what you are trying to do with cal events. 

Posted
10 hours ago, jair101 said:

Hey Martin, 

Not sure if you have noticed that, but the alpha for 4.1.18 states the following changes:


When a location is specified for a Calendar Event, the address will be shown underneath the map. The map itself should also be more accurate now.

I am just mentioning it as it could potentially affect what you are trying to do with cal events. 

Thanks for letting me know. Haven't had a chance to look at it just yet.

Posted

this is the error I get when trying to add my mapquest key:

 

SELECT * FROM `calendar_calendars` LEFT JOIN `core_permission_index` ON core_permission_index.app='calendar' AND core_permission_index.perm_type='calendar' AND core_permission_index.perm_type_id=calendar_calendars.cal_id WHERE (( FIND_IN_SET(4,core_permission_index.perm_view) ) OR core_permission_index.perm_view='*' ) ORDER BY cal_position
IPS\Db\Exception: Table 'padgoi_forums.calendar_calendars' doesn't exist (1146)
#0 /home/padgoi/public_html/boards/system/Db/Select.php(346): IPS\_Db->preparedQuery('SELECT * FROM `...', Array)
#1 /home/padgoi/public_html/boards/system/Db/Select.php(244): IPS\Db\_Select->runQuery()
#2 /home/padgoi/public_html/boards/system/Node/Model.php(182): IPS\Db\_Select->setKeyField('cal_id')
#3 /home/padgoi/public_html/boards/applications/membermap/extensions/membermap/Mapmarkers/Calendar.php(33): IPS\Node\_Model::roots()
#4 /home/padgoi/public_html/boards/applications/membermap/modules/admin/membermap/settings.php(113): IPS\membermap\extensions\membermap\Mapmarkers\_Calendar->getSettings(Object(IPS\Helpers\Form))
#5 /home/padgoi/public_html/boards/system/Dispatcher/Controller.php(96): IPS\membermap\modules\admin\membermap\_settings->manage()
#6 /home/padgoi/public_html/boards/applications/membermap/modules/admin/membermap/settings.php(35): IPS\Dispatcher\_Controller->execute()
#7 /home/padgoi/public_html/boards/system/Dispatcher/Dispatcher.php(129): IPS\membermap\modules\admin\membermap\_settings->execute()
#8 /home/padgoi/public_html/boards/admin/index.php(13): IPS\_Dispatcher->run()
#9 {main}

Posted (edited)

3.1.7 is now uploaded.

  • View permissions are now honored on the map
  • SQL error if Calendar is not installed/enabled
  • Try to fetch coordinates when only a partial address is entered in Calendar. Calendar doesn't do this for you. This caused some markers to now show up on the map.

 

This fixes your error, @Padgoi_the_Djagloi.

@Edward Shephard and @jair101, can you guys test the calendar fix? You'll need to resave the events that's not showing up on the map.

Edited by Martin A.
Posted

I can confirm that it seems to work!

But only for the newly added events, old ones need to be edited/refreshed.

Also, weird thing is happening with one of my events - it doesn't save changes for some locations, but it does for others. It doesn't even work with new events. The example from above - adding event in Siem Reap, Cambodia - location is not saved and map is not shown. Adding it in Phnom Penh, Cambodia is fine. 

Posted
10 hours ago, Martin A. said:

3.1.7 is now uploaded.

  • View permissions are now honored on the map
  • SQL error if Calendar is not installed/enabled
  • Try to fetch coordinates when only a partial address is entered in Calendar. Calendar doesn't do this for you. This caused some markers to now show up on the map.

 

This fixes your error, @Padgoi_the_Djagloi.

@Edward Shephard and @jair101, can you guys test the calendar fix? You'll need to resave the events that's not showing up on the map.

This hasn't fixed my problem.  I'm still getting this, no idea how to fix it.  The settings page seems to be fixed now, but not the actual application itself:

 

2017-01-19_14-05-58.png

Posted
10 hours ago, jair101 said:

I can confirm that it seems to work!

But only for the newly added events, old ones need to be edited/refreshed.

11 hours ago, Martin A. said:

You'll need to resave the events that's not showing up on the map.

 

10 hours ago, jair101 said:

Also, weird thing is happening with one of my events - it doesn't save changes for some locations, but it does for others. It doesn't even work with new events. The example from above - adding event in Siem Reap, Cambodia - location is not saved and map is not shown. Adding it in Phnom Penh, Cambodia is fine. 

"Map is not shown"; Do you mean the mini map in the event view? If that's the case then something else went wrong when saving it. Just tried adding a new event in "Siem Reap" with no issues.

 

57 minutes ago, Padgoi_the_Djagloi said:

This hasn't fixed my problem.  I'm still getting this, no idea how to fix it.  The settings page seems to be fixed now, but not the actual application itself:

Looks like you have custom error pages. I can't really tell what the error is without knowing the error code or proper error message. You might find it in ACP > Support > System/Error Logs.

Posted
18 minutes ago, Martin A. said:

 

"Map is not shown"; Do you mean the mini map in the event view? If that's the case then something else went wrong when saving it. Just tried adding a new event in "Siem Reap" with no issues.

Yes, the mini map is not shown. I can confirm this comes from Member Map, because when I disable it, the mini map in calendar is generated fine. 

 

Posted
35 minutes ago, jair101 said:

I have made a screencast if it helps:

 

 

Can you have a look in ACP > Support > Error Logs, or System Logs, and see if there's any relevant logs there?

Posted
8 minutes ago, Martin A. said:

Can you have a look in ACP > Support > Error Logs, or System Logs, and see if there's any relevant logs there?

Nope, nothing. Only irrelevant stuff. 

Posted
8 hours ago, Martin A. said:

Can you upload this file to /applications/membermap/hooks? Take a backup of the existing file in case this starts throwing errors.

calendarEvent.php.zip

Now the small map is successfully generated with Siem Reap, but it doesn't show on Member Map. No issues with other locations - they successfully generate and are shown on member map as before. 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...