Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 4 of 4 FirstFirst ... 234
Results 46 to 51 of 51
  1. #46
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    3,020
    Thanks
    56
    Thanked 566 Times in 563 Posts
    Google maps on android (which they probably spent most time developing, considering) has pinch and unpinch as well as the zoom buttons. The other right click features (directions, search and others) are on the menu that pops up with a left button click.

    in case we were interested

  2. #47
    Regular Coder
    Join Date
    Nov 2010
    Posts
    432
    Thanks
    56
    Thanked 1 Time in 1 Post
    I guess that sounds okay as then I can make a bunch of vars and say something like this right?

    var FirstMission = 1:3

    if checked remove 1:3 image

    I know that's not Javascript apart from the var but hopefully you understand what I mean there to say if thats possible or not as I need to be able to remove them and a remove all of them if they choose to just look at the map but seek no help.

  3. #48
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,574
    Thanks
    80
    Thanked 4,620 Times in 4,583 Posts
    It needs to be an array. If there are many different kinds of markers, do it like this:

    Code:
    var markers = {
        "1:3" : "firstMission",
        "17:22" : "gold",
        "21:7" : "drown"
    };
    Or you could use the actual URLs of the images instead of names. If you do use names, then we have to have *another* table that matches name to image URL, anyway.
    Code:
    var markerImages = {
        "firstMission" : "/images/questionMark.png",
        "gold" : "/images/goldIcon.png",
        "drown" : "/images/blub_blub_blub.png"
    };
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  4. #49
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,574
    Thanks
    80
    Thanked 4,620 Times in 4,583 Posts
    Another alternative:
    Code:
    var markers = {
        "/images/questionMark.png" : [ "3:17", "22:4", "18:9" ],
        "/images/goldIcon.png" : [ "41:8" ], /* make it an array even if only one */
        "/images/blub_blub_blub.png" : [ "21:2", "21:3", "21:4" ]
    }
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  5. #50
    Regular Coder
    Join Date
    Nov 2010
    Posts
    432
    Thanks
    56
    Thanked 1 Time in 1 Post
    Code:
    var markers = {
          "Chest_Gold" : [ "1:26", "16:28", "5:9", "13:25", "5:9" ]
          "Chest_Metal" : [ "1:11", "10:25", "14:25" ]
          "Chest_Rusty" : [ "6,5", "9:25", "1:24", "15:25", "23:25" ]
    }
    I have these so far, however unlike the here and new objective png images, the chest images are 200x137px. Would it be best to scale them down to the maximum size they can be in the tiles and go from there?

  6. #51
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,574
    Thanks
    80
    Thanked 4,620 Times in 4,583 Posts
    Quote Originally Posted by MrTIMarshall View Post
    I have these so far, however unlike the here and new objective png images, the chest images are 200x137px. Would it be best to scale them down to the maximum size they can be in the tiles and go from there?
    Yes. Not necessary, but will make the page more efficient.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


 
Page 4 of 4 FirstFirst ... 234

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •