Skip to content

Instantly share code, notes, and snippets.

@pironic
Created July 5, 2012 20:49
Show Gist options
  • Save pironic/3056327 to your computer and use it in GitHub Desktop.
Save pironic/3056327 to your computer and use it in GitHub Desktop.
var markers={
"Kalimdor": [
{
"createInfoWindow": true,
"icon": "chest.png",
"displayName": "Locations",
"groupName": "Towns-Kalimdor"
},
{
"createInfoWindow": true,
"icon": "photo.png",
"displayName": "Photos",
"groupName": "Screenshots-Kalimdor"
}
],
"Azeroth": [
{
"createInfoWindow": true,
"icon": "chest.png",
"displayName": "Locations",
"groupName": "Towns-Azeroth"
},
{
"createInfoWindow": true,
"icon": "photo.png",
"displayName": "Photos",
"groupName": "Screenshots-Azeroth"
}
]
};
var markersDB={
"Towns-Kalimdor": {
"raw": [
{
"y": 64,
"text": "Chichen Itza",
"z": -200,
"icon": "http://google-maps-icons.googlecode.com/files/ancienttemple.png",
"x": -150
}
],
"name": "Locations",
"created": false
},
"Screenshots-Kalimdor": {
"raw": [
{
"y": 58,
"text": "Here is a title <br><img width='350' height='250' src='http://i.imgur.com/9MqwRl.jpg'>",
"z": -90,
"icon": "photo.png",
"x": 34
},
{
"y": 64,
"text": "Here is a second image<br><img width='350' height='250' src='http://i.imgur.com/9MqwRl.jpg'>",
"z": -90,
"icon": "photo.png",
"x": 34
}
],
"name": "Photos",
"created": false
},
"Towns-Azeroth": {
"raw": [
{
"y": 64,
"text": "Some Giant Castle",
"z": -90,
"icon": "http://google-maps-icons.googlecode.com/files/castle.png",
"x": 34
}
],
"name": "Locations",
"created": false
},
"Screenshots-Azeroth": {
"raw": [
{
"y": 58,
"text": "Here is a title <br><img width='350' height='250' src='http://i.imgur.com/9MqwRl.jpg'>",
"z": -90,
"icon": "photo.png",
"x": 34
}
],
"name": "Photos",
"created": false
}
};
@eminence
Copy link

eminence commented Jul 9, 2012

For the list of dictionaries in the 'raw' field of markersDB, please use this new template:

{
        "y": 64, 
        "imgurl": "http://i.imgur.com/foo.png", 
        "linkurl": "http://foo.com/bar.html",
        "title": "Title",
        "desc": "Description"
        "z": -200, 
        "icon": "http://google-maps-icons.googlecode.com/files/ancienttemple.png", 
        "x": -150
      }

The title will be displayed in the marker alttext, and at the top of the popup info window. the description will only be displayed in the popup info window (and can be optional)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment