Download & Extend

Patch for better gmap for China

Project:GMap Module
Version:7.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:China, Needs backport to 1.x

Issue Summary

Google map uses "zh-CN" while Drupal use "zh-Hans".
ditu.google.com has better China map than maps.google.com.

AttachmentSizeStatusTest resultOperations
gmap.patch1.56 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch gmap_8.patch. Unable to apply patch. See the log in the details link for more information.View details

Comments

#1

Version:6.x-1.1» 7.x-1.x-dev

Google map uses "zh-CN" while Drupal use "zh-Hans".

This may be one the only one case in which Google api uses different local codes.

#2

Good patch, can we commit it?

#3

related issue #365615: Language detection not working correctly for most Chinese readers

Keep in mind that zh-hans can be any of the following:
zh-cn // China
zh-sg // Singapore

zh-hant can be:
zh-tw // Taiwan
zh-hk // Hong Kong
zh-mo // Macau

#4

Version:7.x-1.x-dev» 7.x-2.x-dev
Status:needs review» needs work

git apply --check gmap_8.patch
error: patch failed: gmap.module:326
error: gmap.module: patch does not apply

can You reroll this patch against latest dev ?

#5

add zh-hans and zh-hant conditions.

AttachmentSizeStatusTest resultOperations
870350.patch1.83 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 870350.patch. Unable to apply patch. See the log in the details link for more information.View details

#6

#5 looks good

commited / pushed to 7.x-2.x dev

thanks!!!

#7

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

git checkout 7.x-1.x
Switched to branch '7.x-1.x'
root@pubuntu:~/gmap# git apply --check 870350.patch
error: patch failed: gmap.module:326
error: gmap.module: patch does not apply

#8

Issue tags:+Needs backport to 1.x

needs backport for 7.x-1.x-dev

#9

Status:needs work» needs review

See attached patch. In 2.4, some code was duplicated, so 1.x patch is smaller.
[Edit] there are also a few other differences, so better disregard this patch.

AttachmentSizeStatusTest resultOperations
gmap1x_870350_8_china.patch1.1 KBIdleFAILED: [[SimpleTest]]: [MySQL] 90 pass(es), 0 fail(s), and 75 exception(s).View details

#10

Status:needs review» needs work

The last submitted patch, gmap1x_870350_8_china.patch, failed testing.

#11

@chinese folks,
The current patch & module use maps.google for the API.
According to below link, we should be using: maps.googleapis.com
https://developers.google.com/maps/documentation/geocoding/#GeocodingReq...

What is the best link for the chinese versions?
Should we still be using : //ditu.google.cn/maps/ ?

#12

I can't find any documentation suggesting that we should use different endpoints (http://maps.googleapis.com/) for different locales. Therefore, I would say that we use "http://maps.googleapis.com/" for all locale, which makes the #6 commit inappropriate.

#13

#9 has a lot of Notices in code
needs work

#14

Version:7.x-1.x-dev» 7.x-2.x-dev
Status:needs work» needs review

This patch removes //ditu.google.cn/maps/ , and does some reshuffleing.

AttachmentSizeStatusTest resultOperations
gmap2_870350_14_china.patch3.86 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch gmap2_870350_14_china.patch. Unable to apply patch. See the log in the details link for more information.View details

#15

Status:needs review» needs work

The last submitted patch, gmap2_870350_14_china.patch, failed testing.

#16

Status:needs work» needs review

new try - didn't refresh my git.

AttachmentSizeStatusTest resultOperations
gmap_870350_16_china.patch2.34 KBIdlePASSED: [[SimpleTest]]: [MySQL] 732 pass(es).View details

#17

Status:needs review» fixed

#16 commited pushed to 7.x-2.x
thanks!!!

#18

Status:fixed» closed (fixed)

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