开发者

Replace default marker on google geoxml map overlays?

I am pulling georss data from feeds and overlaying them onto my map with Google Maps Geoxml. How do I replace the default markers that appear on these map overlays? Currently they are default blue pins but I would like to remove and replace it with something more appropriate for my theme.

I am working on a map for a Wordpress childtheme specifically using the Geo Mashup Plugin.

开发者_StackOverflow中文版

Any help is much appreciated!


Since you're using google maps api V3, use geoxml3.(http://code.google.com/p/geoxml3/)

the original geoxml is made for google maps v2.

You can use any markers you want by specifying the "markerOptions" in the "geoXML3.parser Options" see: http://code.google.com/p/geoxml3/wiki/ParserReference

Hope this helps.


Try this:

var customIcon = new GIcon();
customIcon.image = "./images/customPin.png";
customIcon.shadow = "./images/customShadow.png";
customIcon.iconSize = new GSize(12, 20);
customIcon.shadowSize = new GSize(22, 20);
customIcon.iconAnchor = new GPoint(6, 20);
customIcon.infoWindowAnchor = new GPoint(5, 1);

P.


Thanks for the help but I've found this only works for data points pulled directly from the blog. I am specifically trying to change markers on GGeoxml overlay maps that pulls geodata from other rss feeds. Any other ideas? – thisisangelng

It looks like the default ballon icon cannot be changed. Havent found standard for specifying icon in geoRSS. What about to change rss to kml?

P.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜