Fixed
Status Update
Comments
en...@google.com <en...@google.com>
yo...@gmail.com <yo...@gmail.com> #3
This is only a partial fix.
Color and text in markers are fixed.
However, the size of the marker is still not working (that is: each marker added makes all the other ones its own size, just as happened before the fix with colors and text)
Color and text in markers are fixed.
However, the size of the marker is still not working (that is: each marker added makes all the other ones its own size, just as happened before the fix with colors and text)
en...@google.com <en...@google.com> #4
Link to a demo please?
as...@gmail.com <as...@gmail.com> #5
Here is a demo of the last issue reported. Use the slider to display markers. The markers should scale to different sizes.
http://xn--vrnesplass-d6a.no/maps.php
yo...@gmail.com <yo...@gmail.com> #6
Clarification on the above link (both asbjorn and me are using the same program)
When you move the slider to the end, then zoom in well to an area with many markers.
You will see they have different colors (yellow and green). Each color used to have a different size. Now they are all the same.
If you want to see a demo of markers with 4 different colors, go to:
http://beck.org.il/humogen/maps.php .
Push the "Mark all birth locations" button and zoom in well to the Netherlands. You will see yellow, green, blue and red markers. They are supposed to have 4 different sizes until v3.10 happened.
When you move the slider to the end, then zoom in well to an area with many markers.
You will see they have different colors (yellow and green). Each color used to have a different size. Now they are all the same.
If you want to see a demo of markers with 4 different colors, go to:
Push the "Mark all birth locations" button and zoom in well to the Netherlands. You will see yellow, green, blue and red markers. They are supposed to have 4 different sizes until v3.10 happened.
ka...@gmail.com <ka...@gmail.com> #7
Glad to see I am not the only one with this problem. I thought something had gone wrong with our program.
In our firm we use an in-office application to mark clients on the map and the markers had different sizes and colours according to size of accounts. Now they all have the same size which is confusing. (colour was also a problem for a while but is fixed now)
I can't give a demo since the program runs on our computer network. If necessary I can give a piece of the code though.
Please try to fix this.
Kathy
In our firm we use an in-office application to mark clients on the map and the markers had different sizes and colours according to size of accounts. Now they all have the same size which is confusing. (colour was also a problem for a while but is fixed now)
I can't give a demo since the program runs on our computer network. If necessary I can give a piece of the code though.
Please try to fix this.
Kathy
jm...@gmail.com <jm...@gmail.com> #8
OK guys, I also encountered this problem that rather destroyed the purpose of my map and I had a look in the StyledMarker references.
There has been an important change in the StyledIconTypes.MARKER properties.
These used to be: text, color, size and font.
Now they are: text, color, fore (=color of text), and optional starcolor.
In other words "size" and "font" seem to have disappeared and that might explain why all your (and my) markers now have the same size.
I have no idea why they have taken "size" out of the properties.
As far as I have been able to see in the Google maps API 3.10 reference, marker size still exists in 3.10.
So why did StyledMarker library take "size" out, no idea. Usually libraries expand, not regress.
It was a real cool property to work with and I am sure many map implementations use it.
If any of the StyledMarker team reads this - I hope you folks put it back in...
McLeigh
There has been an important change in the StyledIconTypes.MARKER properties.
These used to be: text, color, size and font.
Now they are: text, color, fore (=color of text), and optional starcolor.
In other words "size" and "font" seem to have disappeared and that might explain why all your (and my) markers now have the same size.
I have no idea why they have taken "size" out of the properties.
As far as I have been able to see in the Google maps API 3.10 reference, marker size still exists in 3.10.
So why did StyledMarker library take "size" out, no idea. Usually libraries expand, not regress.
It was a real cool property to work with and I am sure many map implementations use it.
If any of the StyledMarker team reads this - I hope you folks put it back in...
McLeigh
yo...@gmail.com <yo...@gmail.com> #9
Well, after a lot of searching and debugging I found the reason, a solution and I have a suggestion for the StyledMarker team.
The reason that the size property didn't work anymore is that StyledMarker.js now uses a different default marker. To follow me on this and read up more, visit:
https://developers.google.com/chart/image/docs/gallery/dynamic_icons
In previous version of StyledMarker they used the "d_map_spin" type of marker and now they use the "d_map_pin_letter" type of marker.
What is the difference. Well it is like this:
Both have the properties to place text in the marker and to set color of marker.
"d_map_spin" has the additional properties: size of marker, font size, font-weight.
"d_map_pin_letter" has the additional property: text color.
Therefore they are called with different string sequences.
So with "d_map_pin_letter", which is now used, you can't set marker size, font size or font weight.
With the previousely used "d_map_spin" you can't set the color of the text.
In my local version of StyledMarker.js, I changed the defaults and the getURL function to use "d_map_spin" and its string sequence.
That's all. Now everything works fine again, including marker size.
Before I post the code, I would like to make a suggestion to the StyledMarker team:
Just as today the user can choose to use the regular marker or the "starred" marker, why not make an option to choose between three: "d_map_spin", "d_map_pin_letter" or the starred marker. That way everybody would be happy. Those who want sizable markers will use the first, those for whom it is more important to be able to set text color will use the second, and when you want a (non-sizable!) starred marker us the third.
Here is the changed getURL which makes it possible to use the good old sizable markers (and preserves the ability to choose a starred marker where necessary).
defaults: {
text:'',
color:'ff0000',
fore:'000000',
starcolor:null,
size:0.5,
font:12
},
getURL: function(props){
var _url;
var starcolor_=props.get('starcolor');
var text_=props.get('text');
var color_=props.get('color').replace(/#/,'');
var fore_=props.get('fore').replace(/#/,'');
var size_=props.get('size');
var font_=props.get('font');
if (starcolor_) {
if (text_) {
text_ = text_.substr(0,2);
}
_url = bu_ + 'd_map_xpin_letter&chld=pin_star|';
_url+=text_+'|'+color_+'|'+fore_;
_url+='|'+starcolor_.replace(/#/,'');
} else {
_url = bu_ + 'd_map_spin&chld=';
_url+=size_ + '|0|' + color_ + '|' + font_ + '|_|' + text_;
}
return _url;
},
The reason that the size property didn't work anymore is that StyledMarker.js now uses a different default marker. To follow me on this and read up more, visit:
In previous version of StyledMarker they used the "d_map_spin" type of marker and now they use the "d_map_pin_letter" type of marker.
What is the difference. Well it is like this:
Both have the properties to place text in the marker and to set color of marker.
"d_map_spin" has the additional properties: size of marker, font size, font-weight.
"d_map_pin_letter" has the additional property: text color.
Therefore they are called with different string sequences.
So with "d_map_pin_letter", which is now used, you can't set marker size, font size or font weight.
With the previousely used "d_map_spin" you can't set the color of the text.
In my local version of StyledMarker.js, I changed the defaults and the getURL function to use "d_map_spin" and its string sequence.
That's all. Now everything works fine again, including marker size.
Before I post the code, I would like to make a suggestion to the StyledMarker team:
Just as today the user can choose to use the regular marker or the "starred" marker, why not make an option to choose between three: "d_map_spin", "d_map_pin_letter" or the starred marker. That way everybody would be happy. Those who want sizable markers will use the first, those for whom it is more important to be able to set text color will use the second, and when you want a (non-sizable!) starred marker us the third.
Here is the changed getURL which makes it possible to use the good old sizable markers (and preserves the ability to choose a starred marker where necessary).
defaults: {
text:'',
color:'ff0000',
fore:'000000',
starcolor:null,
size:0.5,
font:12
},
getURL: function(props){
var _url;
var starcolor_=props.get('starcolor');
var text_=props.get('text');
var color_=props.get('color').replace(/#/,'');
var fore_=props.get('fore').replace(/#/,'');
var size_=props.get('size');
var font_=props.get('font');
if (starcolor_) {
if (text_) {
text_ = text_.substr(0,2);
}
_url = bu_ + 'd_map_xpin_letter&chld=pin_star|';
_url+=text_+'|'+color_+'|'+fore_;
_url+='|'+starcolor_.replace(/#/,'');
} else {
_url = bu_ + 'd_map_spin&chld=';
_url+=size_ + '|0|' + color_ + '|' + font_ + '|_|' + text_;
}
return _url;
},
en...@google.com <en...@google.com> #10
OK, it seems like you've got everything working now by changing the marker to d_map_spin. Thanks for your suggestion about the marker type; please consider filing a feature request here: http://code.google.com/p/google-maps-utility-library-v3/issues/list
Description
Working (with v3.9):
Not working (with v3.10):