MapView, draw

Hello developers

I'm developing an application that uses GPS to track the user. I also want to show the route of users found on a map. So what I have is a list of coordinates, and I want to show / draw the route which is formed by these points. Is it still possible?

Thanks in advance

Not yet

You can draw all the positions with markers, but not line

10.2 will add these features to draw lines and circles on top of bb card

Workaround: use another card with webview and javascript - there are samples to github

Tags: BlackBerry Developers

Similar Questions

  • Draw the circle on MapView

    Hi all.

    I am quite new to the development of the Cascades.

    I would like to know if it is possible to trace a circle on a plan, given a Point and a RADIUS.

    I searched a bit on the doc, but I not only found ways to draw polygons from a set of coordinates.

    IIRC the fact maps app exactly that, show GPS accuracy of the signal (IE put a circle around you on the map to show the accuracy of the coordinates).

    Thank you very much, greetings

    Thanks BBSJdev, but I need an overlay following cards (and with a dynamic dimension) and not static.

    In any case, I found a nice way to draw a circle-layer on the mapview. Here is the code:

    It is an improved version of the solution that someone else posted on this forum some time ago (which did not perfectly, as she draws an elypse and not a circle). I can't find this post now, in any case I would like to thank the user who wrote this snippet.

    Here is the code:

    void ApplicationUI::drawCircle(double lon, double lat, double radius) {    MapView *mv = root->findChild("mapView");    DataProvider *dp = mv->mapData()->defaultProvider();
    
        // convert radius meters to latitude width    double latr = radius / 111412.84; // this is the number of meters per degree
    
        // with longitude it's a bit more complicated, since a degree of longitude 's length    // is not constant (unfortunately the earth is not flat)    int a = 6371000; // earth radius in meters    double rad_lat = 0.0174532925 * lat; // convert latitude from degrees to radiants    double _lr = ((M_PI / 180) * a * cosf(rad_lat)); // length of a degree of longitude in meters    double lonr = radius / _lr;    qDebug() << "lonr = " << lonr << " ; _lr = " << _lr << " ; latr = " << latr << " ; lat = " << lat;
    
        GeoPolygon* result = new GeoPolygon;    Polyline line;    const int numOfSeg = 36;    for ( int i = 0; i < numOfSeg; i++ ) {        double theta = 2.0f * 3.1415926f * float( i ) / float( numOfSeg );        double x = lonr * cosf( theta );        double y = latr * sinf( theta );        line.append( Coordinate( y + lat, x + lon ) );    }
    
        result->setOuterBoundary( line );    result->setId("id-circle");    mv->mapData()->defaultProvider()->add(result);
    
    }
    
  • is it possible to draw routes on the plan?

    I want to make a function that can draw routes based on all geopoints in the MapView. But I did not understand how to do this. Anyone know it? Thank you very much.

    I found an alternative solution. Although he can't take the road on the plan as the Android development, it can call RouteMapInvoker.

    http://developer.BlackBerry.com/Cascades/reference/bb__platform__routemapinvoker.html

  • MapViewer: circle of addPointFeature incl.

    Hello

    I wish to use the following function, in MapViewer:
    addPointFeature    (double x,double y, java.lang.String styleName, 
                        java.lang.String label, java.lang.String labelStyleName, 
                        double[] radius) 
    and cannot declare a Circle around the point. ('RADIUS - an array of RADIUS to use when rendering the circles around this feature..')

    Someone at - it an example incl. using the table RADIUS to draw the circle?

    Thank you
    Friedhold

    Hi Friedhold,
    This method has been deprecated, and you must use a similar method that also has the SRID value.
    The radius value should be in meters.

      public void addPointFeature(double x, double y, int srid, String styleName,
                                  String label, String labelStyleName,
                                  double[] radius)
    

    The following is an example.

        try
        {
          String url = "http://localhost:8888/mapviewer/omserver";
          MapViewer mapViewer = new MapViewer(url);
          mapViewer.setDataSourceName("mvdemo");
          mapViewer.setMapTitle("Test");
          mapViewer.setAntiAliasing(true);
          mapViewer.setImageFormat(MapViewer.FORMAT_PNG_URL);
          mapViewer.setDeviceSize(new Dimension(600,475));
    
          mapViewer.setCenterAndSize(-122.2615,37.5266,0.15);
          mapViewer.setBaseMapName("demo_map");
    
          double[] radius = new double[2];
          radius[0] = 1600;  // meters
          radius[1] = 4800;  // meters
    
          mapViewer.addPointFeature(-122.2615,37.5266,8307,"M.STAR",
                              "Center Point","T.STREET NAME",
                              radius);
          System.out.println("Current request: " + mapViewer.getMapRequestString()); 
    
          boolean response = mapViewer.run();
          if(response)
          {
            double[] mbr = mapViewer.getMapMBR();
            System.out.println("mbr="+mbr[0]+","+mbr[1]+" "+mbr[2]+","+mbr[3]);
            System.out.println("URL: " + mapViewer.getGeneratedMapImageURL());
          }
        } catch (Exception e)
        {
          System.out.println("Exception: " + e.getMessage());
        }
    

    João

  • Drawing freehand in another language

    I have updated my Apple Watch watch 3 OS and, to my surprise, I saw that the drawing freehand for responding to messages is not available. My watch is set in Italian and research on Google that I thought I should put the language into English. It's a pain the * (I apologize, I translated what I meant with google translator and it seems that this translation is a little rough, but I don't know of another word to say that).

    Is there another way to have the design freehand in languages other than English (when the letters are almost the same as Italian, except accented) or Chinese (we have seen Chinese working during the keynote)?

    Hello

    To use the Freehand drawing, the language for a conversation must be a language supported for freehand drawing.

    There are currently English, Chinese simplified and Chinese traditional.

    More information:

    Drawing freehand on your Apple Watch - Apple Support

  • I installed 3 watch OS, but there is no function for drawing freehand in messages

    So I recently installed watch OS 3, obviously, I was happy to be able to send messages with it without having my phone out of my pocket to tak.

    The problem is that I don't see the design freehand in messages button, I know where it should be, but he's not here.

    I'm from Belgium, idk if this is because he is not yet available in Belgium, but I can't find anything about it on the internet. My brother has the same problem.

    Hello

    Freehand drawing is not available in all languages.

  • How to draw a line on a pic

    CCan I draw a line on a photo in the photo app. ??

    No, but there are many annotation applications in the App Store. To start try Skitch.

    Almost all drawing applications allow you to set photos, then draw over them, too.

  • Try to draw a hyperbolic curve of line.

    I have numbers 09 version and am doing a hyperbolic curve line. I've set up 10 positive and negative points Thexaxis and when I go to draw on the X 10 positive point rather than return to 0, it starts with 11-20 (now there is negative). How DO you get the negative part of the curve where it should be?

    Hi Tom,

    Could you add the table providing data to the chart in your screenshot, please. Show it with the selected graph.

    Kind regards

    Barry

  • Why don't I have a "Recently deleted" folder in my Notes?  I'm pretty sure that I've improved my Notes app (I can make bulleted lists and draw).  A note has mysteriously disappeared yesterday and I want to try to get it back.

    An important point missing yesterday... poof!... in the air.  At one point, I used the search field in the Notes and the note missing that presented themselves.  But, now, it disappeared again.  I can't find anywhere.  In the search for a solution, I see that I should have a folder called Notes in "recently deleted".  I don't.  I think I have the improved version of Notes because I can make checklists & draw.

    6 s iPhone: iOS 9.3.2

    MacBook Pro: El Capitan 10.11.5

    I looked in all folders.  I have now switched off Notes for all accounts where it had been activated (no Notes existed in these accounts).  On my Mac, on the navigation on the left of the application Notes (files), I: Notes from iCloud, on my Mac and my Notes to gmail.  On my iPhone, the list of files just a pointed iCloud and on my Notes from the iPhone.

    Bottom line:

    To this, I have been for over 2 hours now.  I'm willing to give up the missing note (unfortunately), but really want to know where my "Recently deleted" folder is located (don't know if I'd ever).  If you tell me to reset my phone or digging through backups as a last resort, please explain step by step and let me know what I could lose it making.

    Thanks in advance!

    Update: I have just disabled my gmail account note on my Mac so that both (phone and laptops) Notes apps list the same folders... for only iCloud + on my Mac / On my iPhone.

  • App for drawing on tablet of bamboo?

    In addition to Photoshop, does anyone know of an app that can be used for drawing on a Wacom USB Tablet?

    Any application that can poduce graphics will work with a drawing tablet:

    Keynote, Pages, Pixelmator, Illustrator, graphic Autodesk, Open office, the list is endless.

  • Why not a draw box to select several emails for deletion or any select sender for deletion?

    Would make my Inbox neglected much easier to manage.

    The method chosen is the sequence of traditional keys that have been there since the point of the year.

    http://chrisramsden.vfast.co.UK/8_How_to_sort.html

    Note ctrl + a for "select all."

    Draw boxes work well with icon style poster. On a textual list as seen in Thunderbird, click - action slide seems to default to drag - move.

    Here, Linux, Caja file manager, watching the draw thing only works with display of the icon style. In list view, he hangs out.

  • Drawing s combined arc introduced into canvas?

    Hello

    I'm working on an HTML5 canvas game, where some areas need to be stretched connceted in sort of a "blob" of circles.

    The code to draw using im looks like this, and an example can be found on github:
    https://github.com/JRIE/connect

    The error is visible when a fleet is surfed outside the main circle, check that:
    Click the icon of the fleet, click on the planet, by pressing T to take a tour and see the fleet moves
    At one point, a graphic strange, similar to a triangle or an extension error.

    Please try different distances, destionations as possible, its always this strange effect.

    The result is the code in question:

    Line 2340 until 2348

    gameScreen.beginPath();
           for (area in env.scanAreas) {
               scanArea = env.scanAreas[area];
               scanX = scanArea[1] + env.offsetX;
               scanY = scanArea[2] + env.offsetY;
               gameScreen.arc(scanX, scanY, scanArea[0], 0, 6.28);
           }
    
           gameScreen.closePath();
           gameScreen.fill();
    

    If the beginPath and closePath and filling are all crammed into the loop for, he draws well, but it's a different and not a "blob" effect, as requested in this case.

    Hello Patrick,.

    Thank you for coming back to me. For some reason any, that I found my problem, it was not really related to the order of the code, but which drew a circle, and then plotting another circle further, without using a "canvasObject.moveTo" - there is another draw of line as the 'pencil' moves to the location of the new circle, creating a kind of intersection.

    I initially thought it was a kind of record, but this time there it a certain sense - think of a turtle drawing engine.

    In any case, thanks for responding!

  • You can change the font size using the form in the preview (not with the text box). Having also arrow drawing trouble in preview.

    You can change the font size using the form in the preview (not with the text box). Having also arrow drawing trouble in preview.

    What problems are you having with the arrow? You go to Tools-> annotate-> arrow and an arrow appears. Then you can drag around the head and tail to make it to the desired location.

  • Google Mapview no longer works in Firefox

    Google Maps Satellite view works, but mapview does not work. I don't have this problem with Internet Explorer. If I click on mapview in Firefox, it just says: "loading", but nothing happens. I tried the troubleshooting information in Google, but it does not solve the problem.

    Many issues of the site can be caused by corrupted cookies or cache. To try to solve these problems, the first step is to clear cookies and cache.
    Note: This will be you temporarily disconnect all sites, you're connected to.
    To clear the cache and cookies to do the following:

    1. Go to Firefox > history > clear recent history or (if no Firefox button is displayed) go to tools > clear recent history.
    2. Under "Time range to clear", select "all".
    3. Now, click the arrow next to details to toggle the active details list.
    4. In the list of details, see the Cache and Cookies and uncheck everything.
    5. Now click the clear now button.

    More information can be found in article to clear your cache, history, and other personal information in Firefox .

    This solve your problems? Please report to us!

  • 15 Firefox load pages several times in my sandbox but I have to click on them from the drawer to open and then manually - remove multiples which gives

    Firefox is loading pages several times in my sandbox - have to open manually from the drawer and then manually remove multiples or it screws until the opening - which is the cause - or chrome or IE do this

    Each button in the task bar normally represents a window of Firefox (or another application window). The two mysteries are (1) why so many windows of the same document and (2) why the windows reduced to the task bar?

    What is the URL of the page that keeps the opening of several windows (reduced)? Is this the same URL that you have as your home page?

    Could you try to use temporarily a blank home page and see if the problem of multiple windows disappears?

    Orange Firefox button or classic menu Tools > Options > general > "startup of Firefox".

Maybe you are looking for

  • Need help with the Apple ID!

    I have a problem. I forgot my password to iCloud. I deleted all the commands. I got a new Apple ID. I typed a new ID. It worked. Suddenly the AppStore asked a former password for the old account... What can I do? Please help me!

  • Should I get the base Macbook Air 11 inches, the 4 GB of ram?

    My use of the computer is basically writing, internet, surfing, streaming videos and music and the occasional simple recording with Audacity (and, eventually, once Garage Band that am I on Mac). I am looking to buy a Mac to last me through my last ye

  • How can I make my impression of bigger aol

    Internet explore my aol mail fills the screen. but on firefox, is toosmall. How can I make it bigger?

  • Solved

    issue is resolved, but I do not know how to remove or is it delete button?

  • Can someone please explain the TV Turner in the MediaCenter for me please?

    I just bought a HP Pavilion dv5 - 1334 laptop ca and im yet to learn all that he can do. I read a few things in the manual and in the section on the TV Tuner user guide, but I still don't understand what it is and what it does. My computer can load w