Map widget

Follow

Comments

10 comments

  • Avatar
    thomaslsimpson

    I would like to draw polygons on the map. I loaded polygons programmatically and attempted to display the Zone(s) but all I can see if a marker, rather than a polygon. Am I missing something or is this not supported? 

  • Avatar
    sid.mallya

    Hi!

    I see that there is a map move in and move out functions in the IDE. But can the map detect if the User is already in a specified region? (that is, he starts the GPS module only when he is near the region)

  • Avatar
    richard

    thomas,

    sorry, you cannot display polygons on the map at the moment.

  • Avatar
    tom

    Hi Sid,

     When you say map move in and move out do you mean the geo triggering that is talked about here: https://appfurnace.zendesk.com/entries/21266451-tutorial-5-using-location-gps

    For both the points and then zones if the user starts the app or turns the GPS on while in a hotspot then move in will trigger as if the user had turned the GPS on outside of the hotspot and walked in. I hope this answers your question. 

    All the best

    Tom

  • Avatar
    sid.mallya

    @Tom,

    Yes! That's exactly what I meant. Although, I am currently adding "zone.userInside()" to the custom code as well, just in case! Hope that works well too.

    Thanks for the quick reply too!

    Cheers,

    Sid

  • Avatar
    susanmcw

    Is there a way to trigger things (audio, video etc) based on direction of movement.  Example.  One set of actions is triggered as I move from North to South along a pier. A different set of actions are triggered as I reverse and move from South to North (in other words one set of triggers occurs as I walk seaward on the pier and a different set when I walk landward) ?

    Thanks and Best,

    Susan 

  • Avatar
    kieron

    Hi Susan,

    You could try implementing the Phonegap Compass API if you'd like to be really accurate (http://the.appfurnace.com/docs/cordova_compass_compass.md.html#Compass), but if you want to keep it reasonably simple (like the example of North/South you suggested), I'd probably do the following:

    1. Create three zones in your Location tab, one is the "main" trigger point, and one either side (North & South) that will serve as "pre-zones" - which will change the behaviour of the main point (see attached screenshot of a possible setup)

    2. Give the "main" point a movein function of "triggerMain", give the south-bound zone a movein of "setHeadingSouth", and the north-bound zone "setHeadingNorth".

    3. In your code tab, paste this:

    var direction = "";


    // FUNCTIONS
    // ------------------------------- //

    function setHeadingSouth(){

       direction = "south";
    }

    function setHeadingNorth(){

       direction = "north";
    }

    function triggerMain(){

       if(direction == "south"){

          // DO SOUTHWARD ACTIONS
          alert("South bound");
       }
       else if(direction == "north"){

          // DO NORTHWARD ACTIONS
          alert("North bound");
       }
    }

    What this will do is catch the previous location of a user (either south or north of the main point), and when they reach the main point, it will trigger the relevant action.

    Hope that helps




    AppFurnace_DirectionalZones.png
  • Avatar
    susanmcw

    I'm trying this now I think I have some questions but will hold off and put them all together once I see what happens when I try this.Thanks & Best,

    Susan

  • Avatar
    Creative Nonfiction
    Ok, here's a weird question: Is there any way to flip the map upside-down? i.e. have south pointing up? cheers!
  • Avatar
    kieron

    Hi,

    There isn't unfortunately, is there a specific reason for wanting to do this?

Please sign in to leave a comment.

Powered by Zendesk