• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Member Map

I can add an option where you define the default zoom level (now it's 2, max is 21). The code is designed to have as many markers as possible in view. From memory, you're running a forum for people in the Youngstown, OH area. For that you could set the zoom level to 10, and you're map would look like this. Will look very out of place till you add your first location, tho.
View attachment 15529

That is excellent Martin!
 
Changelog for v1.0.2
  • 1.0.2
    • Re-visited previously fixed bug
    • Added HTML5 geolocation
    • Added option for defining default zoom level
    • Added two missing phrases in the options page
    • Added a "Can view map" permission (Remember to set this if your upgrading!)
    • Changed colors in the CSS file to use existing style properties
    • If a user is using the map, it now shows in their online status.
 
getting this error on upgrade.

Server Error
Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT_NULL, `marker_type` enum('user','custom') NOT NULL DEFAULT 'user', ' at line 2
 
Excellent add-on!
Only the install (importing the XML) (on xf 1.00) didn't work for me:

Mysqli statement execute error : Table 'tsjech_xf.memberMap' doesn't exist
  1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
  2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
  3. ....
 
Excellent add-on!
Only the install (importing the XML) (on xf 1.00) didn't work for me:
All good things are five, right? Uninstall what you have now, and drop the table named "membermap", and install 1.0.2-5. For some reason the table name was turned into lower case.

@Martin
Great addon, but search not work for me if I add my location at russian. Can you fix that?
What result do you get, and what did it return? If you can, inspect the AJAX request, and let me know what the item named "last_request" contains.
 
What result do you get, and what did it return?
I type Москва (Moscow).
moscow.webp
If you can, inspect the AJAX request, and let me know what the item named "last_request" contains.
I hope you mean this...
Code:
noResults
    true

last_request
    "GET /maps/api/geocode/json?address=%25D0%259C%25D0%25BE%25D1%2581%25D0%25BA%25D0%25B2%25D0%25B0&sensor=false HTTP/1.1 Host: maps.googleapis.com Connection: close Accept-encoding: gzip, deflate User-Agent: Zend_Http_Client "

And another bug found ;)
By search press Enter key and you get error:
Server Error

Undefined offset: 1
  1. XenForo_Application::handlePhpError() in memberMap/ControllerPublic/MemberMap.php at line 180
  2. memberMap_ControllerPublic_MemberMap->actionDoAddMarker() in XenForo/FrontController.php at line 310
  3. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  4. XenForo_FrontController->run() in /***********/index.php at line 13
 
All good things are five, right? Uninstall what you have now, and drop the table named "membermap", and install 1.0.2-5. For some reason the table name was turned into lower case.

Ok, works perfectly now. Thanks!
My users mainly originate from 3 countries in Europe, so it would be good if we could set a default zoom level.
Also I'd love to see some additional feature, like linking the pin to the user profile! :) already there I see!
 
@Martin - I dont know what anyone else thinks, but personally I think the height of the map and sidebar is too large. On my screen at 1366x768 I cannot get the whole map on my screen, therefore clicking on a map marker at the top of the screen looks to the user to do nothing as they cannot see the slidein member stuff at the bottom right of the map.
 
I type Москва (Moscow).
View attachment 15558

I hope you mean this...
Code:
noResults
    true

last_request
    "GET /maps/api/geocode/json?address=%25D0%259C%25D0%25BE%25D1%2581%25D0%25BA%25D0%25B2%25D0%25B0&sensor=false HTTP/1.1 Host: maps.googleapis.com Connection: close Accept-encoding: gzip, deflate User-Agent: Zend_Http_Client "

And another bug found ;)
By search press Enter key and you get error:
A new version will be out in a few minutes/half an hour that takes care of all of these issues :)

@Martin - I dont know what anyone else thinks, but personally I think the height of the map and sidebar is too large. On my screen at 1366x768 I cannot get the whole map on my screen, therefore clicking on a map marker at the top of the screen looks to the user to do nothing as they cannot see the slidein member stuff at the bottom right of the map.
I'm on 2560x1440, and often forget about resolutions smaller than that :p In the version I'll releasing later tonight will fix that by doing some javascript calculations to figure out the appropriate height.
 
Changelog for v1.0.3
  • Calculating the height of the map using Javascript instead of fixed CSS values
  • Fixing missing location search results by changing to the geocoder built into Google Maps API
  • Hitting the enter key in the marker form now searches for the location, instead of automatically submitting the form (which in some cases caused you to delete your location, or throw a PHP error)
 
Changelog for v1.0.3
  • Calculating the height of the map using Javascript instead of fixed CSS values
  • Fixing missing location search results by changing to the geocoder built into Google Maps API
  • Hitting the enter key in the marker form now searches for the location, instead of automatically submitting the form (which in some cases caused you to delete your location, or throw a PHP error)

You resized it I'll give ya that much :D Just a little too much . Also the sidebar needs to be correctly resized with it if possible m8

Capture.webp
 
You resized it I'll give ya that much :D Just a little too much . Also the sidebar needs to be correctly resized with it if possible m8

View attachment 15564
The calculation is actually spot on, probably too much. As the content below the map is included in the calculation, your 250px high banner on the bottom "threw" it off. And if the marker list was resized too, you would see that it all fitted in the screen with no scrollbars on the side. I will adjust the code to not take the content below into consideration, and adjust the height of the list too (the list on my dev board was too small to spot this :( ).
 
The calculation is actually spot on, probably too much. As the content below the map is included in the calculation, your 250px high banner on the bottom "threw" it off. And if the marker list was resized too, you would see that it all fitted in the screen with no scrollbars on the side. I will adjust the code to not take the content below into consideration, and adjust the height of the list too (the list on my dev board was too small to spot this :( ).

Thought it might be the banner today whilst Ive been at work (yeah I think too much lol) but hadnt had chance to test it.

On another note, users love it m8. Great work :)
 
Back
Top Bottom