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?

Files: 
CommentFileSizeAuthor
#28 gmap-zoomcontrol-D6-1851028.patch2.3 KBhutch
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch gmap-zoomcontrol-D6-1851028.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#9 gmap-zoomcontrol-1851028.patch2.3 KBhutch
PASSED: [[SimpleTest]]: [MySQL] 29 pass(es).
[ View ]
#7 gmap_js.diff1.82 KBbgprior
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch gmap_js.diff. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

Title:how to enable pan/zoom controlspan/zoom controls disapeared
Category:support» bug

no 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.

Version:7.x-2.x-dev» 7.x-2.7

Same 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?

+1

I 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.

It 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?

A recent Google dev announcement has this:

The following Map options were deprecated a long time ago and are no
longer respected: navigationControl and navigationControlOptions.

These are still being implemented in gmap.js

They have been replaced by
zoomControl
zoomControlOptions
ZoomControlStyle

Version:7.x-2.7» 7.x-2.8-beta1
StatusFileSize
new1.82 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch gmap_js.diff. Unable to apply patch. See the log in the details link for more information.
[ View ]

Thanks. 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.

It'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

Version:7.x-2.8-beta1» 7.x-2.x-dev
StatusFileSize
new2.3 KB
PASSED: [[SimpleTest]]: [MySQL] 29 pass(es).
[ View ]

Here 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

Fantastic. Thanks. Hopefully can be built in to next release.

Version:7.x-2.x-dev» 6.x-2.0-beta3

Hey 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.

I 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

patching file js/gmap.js
Hunk #2 succeeded at 331 (offset 1 line).

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.

Thank you for such a speedy response! I shall test in a dev enviro first :)

Just 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!

The patch failed for me against 6.x-2.0-beta3, but succeeded against 6.x-2.x-dev (from May 14, 2013).

Title:pan/zoom controls disapearedPan/zoom controls disappeared
Version:6.x-2.0-beta3» 7.x-2.x-dev
Status:Active» Needs review

The 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?)

Patch 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.

Status:Needs review» Reviewed & tested by the community

That's 3 positives against the patch in #9, marking as RTBC.

Status:Reviewed & tested by the community» Fixed

#9 commited pushed to 7.x-2.x-dev
will be tagged in next upcoming release
Thanks!!!

Does this also need to be ported to 6.x-2.x-dev I don't see it in the commits there? Thanks.

Version:7.x-2.x-dev» 6.x-2.x-dev
Status:Fixed» Patch (to be ported)

Setting as 'to be ported' then.

#9 worked for me also.

Perfect #9 worked a charm!

#9 works great with 6.x-2.x but it does need a setting for panControl

Status:Patch (to be ported)» Needs review

#9: gmap-zoomcontrol-1851028.patch queued for re-testing.

Thanks, #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

StatusFileSize
new2.3 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch gmap-zoomcontrol-D6-1851028.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Here is the same patch as in #9 but explicitly made on gmap 6.x-2.x-dev

Did the same as #27. All good.

I just need to get my markers back now.

Status:Needs review» Fixed

#28 commited pushed to 6.x-2.x-dev
Thanks!!!

Latest dev fixed the issue for me, thanks.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Issue summary:View changes

typo

Status:Closed (fixed)» Needs review

Always 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

Status:Needs review» Needs work

The last submitted patch, 28: gmap-zoomcontrol-D6-1851028.patch, failed testing.

#9 worked with 7.x-2.8