Skip to content
Snippets Groups Projects
Commit 304bb991 authored by rvallejo's avatar rvallejo Committed by podarok
Browse files

Issue #2575705 by rvallejo: Scaling GMap Marker Icons for High Res Displays (Mobile, etc.)

parent a9253b21
No related branches found
Tags 7.x-2.10-rc1
No related merge requests found
......@@ -200,14 +200,15 @@ function _gmap_compress_icon_def($iconset) {
'anchorY',
'infoX',
'infoY',
'scale',
'shadow',
'printImage',
'mozPrintImage',
'printShadow',
'transparent',
);
$ints = array(3 => TRUE, 4 => TRUE, 5 => TRUE, 6 => TRUE);
$nulls = array('', '', array(), 0, 0, 0, 0, '', '', '', '', '');
$ints = array(3 => TRUE, 4 => TRUE, 5 => TRUE, 6 => TRUE, 7 => TRUE);
$nulls = array('', '', array(), 0, 0, 0, 0, 0, '', '', '', '', '');
$a = array();
for ($c0 = 0; $c0 < count($order); $c0++) {
......
......@@ -65,6 +65,10 @@ Drupal.gmap.getIcon = function (setname, sequence) {
null,
new google.maps.Point(q.anchorX, q.anchorY)
);
// Only set scaledSize if the scale variable makes sense as a divisor
if (q.scale > 1) {
t.scaledSize = new google.maps.Size(q.sequence[i].w/q.scale, q.sequence[i].h/q.scale);
}
if (q.shadow.f !== '') {
this.gshadows[setname][i] = new google.maps.MarkerImage(p + q.shadow.f,
new google.maps.Size(q.shadow.w, q.shadow.h),
......@@ -147,9 +151,9 @@ Drupal.gmap.expandArray = function (arr, len) {
*/
Drupal.gmap.expandIconDef = function (c, path, files) {
var decomp = ['key', 'name', 'sequence', 'anchorX', 'anchorY', 'infoX',
'infoY', 'shadow', 'printImage', 'mozPrintImage', 'printShadow',
'infoY', 'scale', 'shadow', 'printImage', 'mozPrintImage', 'printShadow',
'transparent'];
var fallback = ['', '', [], 0, 0, 0, 0, {f: '', h: 0, w: 0}, '', '', '', ''];
var fallback = ['', '', [], 0, 0, 0, 0, 0, {f: '', h: 0, w: 0}, '', '', '', ''];
var imagerep = ['shadow', 'printImage', 'mozPrintImage', 'printShadow',
'transparent'];
var defaults = {};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment