Pages: [1]
Print
Author Topic: Manual Markers  (Read 449 times)
flip
Newbie
*
Posts: 26


« on: May 22, 2010, 09:32:24 AM »

Hello,

I want to show different manual markers depending on the partner status for each location in the database. I did the following:

1.) I selected form "Resources > Application Settings > Location Marker" the "Manual Marker".
2.) I uploaded different manual marker graphics such as partner-authorized.png or partner-premium.png to:
/warpcore/literadius/views/map_assets/js_css/markers/partner-authorized.png
3.) I changed the marker image for the location data in the field "marker" from manual_marker.png to the custom graphics which I uploaded, e.g. partner-premium.png

The graphic shows up beside the marker field of the "Edit location data" view in the backend. On the frontend on the map the graphics aren't shown but instead the default Google markers.

What do I need to do to show the different manual marker graphics for different locations on the map?

Philip
Logged
Support
Administrator
Jr. Member
*****
Posts: 93



« Reply #1 on: May 22, 2010, 09:49:18 AM »

You'll have to maintain the same name states as the existing marker set. So replace the default markers with your own but keep the names like marker_00.png, marker_01.png, etc.

Since the size of your marker will likely be different than the default set you will also need to specify the marker attributes as well as create a custom shadow. Those attributes are in the map_assets/js_css/xml_g_maps.js script file.

This resource will calculate all those values for you: http://www.cycloloco.com/shadowmaker/
« Last Edit: May 22, 2010, 09:52:04 AM by Support » Logged
flip
Newbie
*
Posts: 26


« Reply #2 on: May 22, 2010, 01:04:34 PM »

Thanks! I now duplicated the following code which seems to be working on the frontend:

// Authorized Partner
custom_icon['partner-authorized.png'] = new GIcon();
custom_icon['partner-authorized.png'].shadow = icon_path + "partner-shadow.png";
custom_icon['partner-authorized.png'].image = icon_path + "partner-authorized.png";
custom_icon['partner-authorized.png'].iconSize = new GSize(19.0, 24.0);
custom_icon['partner-authorized.png'].shadowSize = new GSize(33.0, 24.0);
custom_icon['partner-authorized.png'].iconAnchor = new GPoint(10.0, 24.0);
custom_icon['partner-authorized.png'].infoWindowAnchor = new GPoint(19.0, 0.0);
custom_icon['partner-authorized.png'].infoShadowAnchor = new GPoint(0.0, 24.0);
Logged
Pages: [1]
Print
Jump to: