Closed (fixed)
Project:
Geolocation Field
Version:
8.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Feb 2016 at 09:49 UTC
Updated:
26 Feb 2016 at 09:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
juliencarnot commentedReproduced with latest dev version, including the new way of setting the center induced by 2625952 (in both first row and fixed modes).
Comment #3
christianadamski commentedOriginally the fixed centre point was included in the set of bound positions, so it would at least be present. Not sure if that is true anymore. Definitely not the centre anyway after the fitBounds() call.
The problem I don't get around yet is, that the zoom is static. Right now fixing the map centre with a static zoom value, makes it basically pure luck if the locations fit to the map or not.
If you have the time: https://developers.google.com/maps/documentation/javascript/reference which of these functions seems the most appropriate? panToBounds() sounds quite good. Set the fixed centre value on the map and than call that function on the bounds. Yes/no/maybe?
Comment #4
juliencarnot commentedOk, I guess I didn't understand the feature correctly. My current use case might sound a bit strange, but I want to display a specific area at a certain zoom level, like an excerpt of the content. Some locations from elsewhere are not initially displayed, but are shown if one zooms out and move to their area (I managed to do that by altering the geolocation-common-map.js file to set a center and a zoom level)
So here's what I was expecting:
I was wondering why the zoom couldn't be set in the GUI for the two first options, and overridden for the last one, but it makes more sense if fitBounds was to be used in each scenario.
What I don't really get then is how the first row option would be different from a fitBounds on every location including that one, and in which scenario you would set a fixed "center" outside of the area of your locations but still intend to display all of them...
As a matter of fact, I don't really have an opinion about the fitBounds alternatives, it worked well when I tried to use it, adjusting the viewport and displaying all locations.
Hope this comment makes some sense to you, sorry for my misunderstanding!
Comment #5
christianadamski commentedPlease test.
Comment #11
christianadamski commentedFixed test view
Comment #12
juliencarnot commentedThanks, this is great!
Some remarks:
Comment #13
christianadamski commentedComment #14
juliencarnot commentedThanks again!
Comment #15
christianadamski commented4. The override option is with the selection of the Format (=style), not its setting. I have the "This display" choice when I click the "Geolocation - CommonMap" instead of "Settings"
Can you confirm that?
Comment #16
juliencarnot commentedOk, really sorry about that! I was wrongly assuming that the "This display" choice on the "Geolocation - CommonMap" modal was only impacting that modal and not the settings modal! Thanks!
Comment #17
christianadamski commentedWell, it's a bit much to ask you that, but, does it actually work? I did not yet get around to test that and already getting occupied with new work. can you test that? Like, create a page and two attachments with both commonmap styles but different settings? Does that actually work? PHP wise and JS wise?
Comment #18
juliencarnot commentedYes, I created a page view with commonmap and included a block from the same view with commonmap, both with different settings and they coexist happily! Thanks so much!
Comment #19
christianadamski commentedThank you! :)
I guess this is RTBC than...
Maybe Jochen will also test one more time to be sure.
Comment #20
derjochenmeyer commentedThanks! Any reason to use centre instead of center in some places?
Comment #21
derjochenmeyer commentedHere's an interdiff
Comment #22
christianadamski commentedhttp://grammarist.com/spelling/center-centre/
I'm just THAT sophisticated...
But seriously, I don't care either way.
Comment #24
derjochenmeyer commentedWell we need to discuss that ,-)
No seriously, I just wanted to get the git attribution.