Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
i was sure i used to have these std pan/zoom controls on my maps; but they are no longer showing up: http://screencast.com/t/nXe2EemD
anyone know how to enable these?
Comment | File | Size | Author |
---|---|---|---|
#28 | gmap-zoomcontrol-D6-1851028.patch | 2.3 KB | hutch |
#9 | gmap-zoomcontrol-1851028.patch | 2.3 KB | hutch |
#7 | gmap_js.diff | 1.82 KB | bgprior |
Comments
Comment #1
liquidcms CreditAttribution: liquidcms commentedno support help so i'll change to a bug as they were there and seemed to have disappeared; likely due to rel update.. but will check that next.
Comment #2
UziTech CreditAttribution: UziTech commentedSame issue only it seems controls randomly come and go.
I was setting some defaults for the gmap when I noticed the controls weren't there. Then I changed a couple other things and saved the configuration and the controls were there. Now I can refresh the page and about 1 in every 10 times I refresh the controls are there 9 out of 10 the controls are gone.
Any idea where to start looking for the bug?
Comment #3
bgprior CreditAttribution: bgprior commented+1
Comment #4
bgprior CreditAttribution: bgprior commentedI think the explanation in my case was that I was also running the Device Geolocation module. It also uses the Google Maps API. I was getting a "you have included the Google Maps API multiple times on this page. This may cause unexpected errors" warning. Disabling the Device Geolocation module allowed the zoom controls to show up on the Google Map.
Comment #5
bgprior CreditAttribution: bgprior commentedIt has started happening again (controls not visible). nomousezoom also doesn't work in gmap config, but does from macros.
I've tried installing the latest dev version. It doesn't help.
No showstopper js errors like last time. A few CSS gripes, but nothing that looks like it would cause it.
I had a look at the Maps API v3 documentation, and it looks like a lot of objects and functions have been renamed, mostly for additional control or functionality. There's no "controltype", which appears to be what the gmap code is still targeting.
Is this just a question of the gmap code still targeting a lot of API v2 calls?
Comment #6
hutch CreditAttribution: hutch commentedA recent Google dev announcement has this:
These are still being implemented in gmap.js
They have been replaced by
zoomControl
zoomControlOptions
ZoomControlStyle
Comment #7
bgprior CreditAttribution: bgprior commentedThanks. So all that's needed to get the zoom control back is to change gmap.js as per the attached diff? It worked for me.
Obviously, it would be nicer to take advantage of the more granular control in the new API, and choose which if any of zoom, pan and rotate controls are wanted, and in what style. But this works for me as a quick fix to get zoom back.
Comment #8
hutch CreditAttribution: hutch commentedIt's not quite as simple as that, the settings are now divided into two.
panControl: (true or false)
zoomControl: (true or false)
zoomControlOptions: {style: controltype}
where controltype is one of
google.maps.ZoomControlStyle.DEFAULT
google.maps.ZoomControlStyle.SMALL
google.maps.ZoomControlStyle.LARGE
Comment #9
hutch CreditAttribution: hutch commentedHere is a patch on current dev made in a fresh git clone.
Use
patch -p1 < gmap-zoomcontrol-1851028.patch
It fixes the zoomControl and adds panControl
It also sets mapTypeControl to false if mtc is "none"
panControl could do with its own setting in gmap_settings_ui.inc
Comment #10
bgprior CreditAttribution: bgprior commentedFantastic. Thanks. Hopefully can be built in to next release.
Comment #11
elshae CreditAttribution: elshae commentedHey I am using the D6 version 6.x-2.0-beta3 and I am having the same issue. Was the D6 version also affected by what was mentioned above? My understanding is that changes in the API brought this? Is there anyway in the macro to tell it to show pan/zoom? or am I forced to patch? Can I use this patch in D6?
Sorry for all of the questions, but I have been at it all day and I am thinking this post is on the money with what's going on with our end of things.
Thank you.
Comment #12
hutch CreditAttribution: hutch commentedI made a fresh git clone of 6.x-2.x and copied the patch into the gmap folder, ran
patch -p1 < gmap-zoomcontrol-1851028.patch
Output was
So it patched allright and it looks allright, I have no D6 rig to test it on but I would guess it will, on current dev of course.
Comment #13
elshae CreditAttribution: elshae commentedThank you for such a speedy response! I shall test in a dev enviro first :)
Comment #14
elshae CreditAttribution: elshae commentedJust wanted to report that I used the patch on the latest 6.x-2.x-dev version and was very successful. Pan and zoom controls are back :).
Many thanks!
Comment #15
acrosmanThe patch failed for me against 6.x-2.0-beta3, but succeeded against 6.x-2.x-dev (from May 14, 2013).
Comment #16
JKingsnorth CreditAttribution: JKingsnorth commentedThe patched in #9 worked great for me. So that's 2 positive reviews.
(I suppose the correct method is to get it patched in D7 and then look at the backport to D6?)
Comment #17
stefan.kornPatch from #9 worked for me as well in D7 - Thanks a lot. I think this should be included in the dev and prod version soon, because I think it is a major issue for this great module.
Comment #18
JKingsnorth CreditAttribution: JKingsnorth commentedThat's 3 positives against the patch in #9, marking as RTBC.
Comment #19
podarok#9 commited pushed to 7.x-2.x-dev
will be tagged in next upcoming release
Thanks!!!
Comment #20
kenorb CreditAttribution: kenorb commentedMarked as duplicated of this: #1986108: Zoom (not Scale) Control not showing on map
Comment #21
izmeez CreditAttribution: izmeez commentedDoes this also need to be ported to 6.x-2.x-dev I don't see it in the commits there? Thanks.
Comment #22
JKingsnorth CreditAttribution: JKingsnorth commentedSetting as 'to be ported' then.
Comment #23
raprieto CreditAttribution: raprieto commented#9 worked for me also.
Comment #24
Collins405 CreditAttribution: Collins405 commentedPerfect #9 worked a charm!
Comment #25
caktux CreditAttribution: caktux commented#9 works great with 6.x-2.x but it does need a setting for panControl
Comment #26
podarok#9: gmap-zoomcontrol-1851028.patch queued for re-testing.
Comment #27
Wappie08 CreditAttribution: Wappie08 commentedThanks, #9 worked fine for me on 6.x-2.0-beta3 (patched by hand), so if patch is compatible with 6.x-2.x-dev it's RTBC.
Greets
Comment #28
hutch CreditAttribution: hutch commentedHere is the same patch as in #9 but explicitly made on gmap 6.x-2.x-dev
Comment #29
dunx CreditAttribution: dunx commentedDid the same as #27. All good.
I just need to get my markers back now.
Comment #30
podarok#28 commited pushed to 6.x-2.x-dev
Thanks!!!
Comment #31
brisath CreditAttribution: brisath commentedLatest dev fixed the issue for me, thanks.
Comment #32.0
(not verified) CreditAttribution: commentedtypo
Comment #33
afagioli28: gmap-zoomcontrol-D6-1851028.patch queued for re-testing.
Comment #34
afagioliAlways usefull check latest commits. gmap has: https://drupal.org/node/33591/commits
I had my pan/zoom reappeard with http://drupalcode.org/project/gmap.git/blob_plain/e196906:/js/gmap.js
thanks
Comment #36
crutch CreditAttribution: crutch commented#9 worked with 7.x-2.8
Comment #37
Dubs CreditAttribution: Dubs commented+1 from me too. It would be good to get this committed to 7.
Comment #38
manikandan.btech CreditAttribution: manikandan.btech commented@hutch It's worked for me. Thank you very much.