MapField

Can I view many rental outlets in a MapField?

You can draw several on mapfield s POI locations. Use this piece of code for the same

    protected void paint(Graphics graphics)
    {

        super.paint(graphics);

        for(int i = 0;i< HttpCommunication.poiArr.size();i++)
        {
        graphics.drawBitmap(newX, newY, bitmap.getWidth(),      bitmap.getHeight(), bitmap, 0, 0);
        }
}

Press the button Bravo thank the user who has helped you.

If your problem has been resolved then please mark the thread as "accepted solution".

Tags: BlackBerry Developers

Similar Questions

  • MapField convertWorldToField()

    Hi all

    value of the Mapfield convertWorldToField method differ depending on the zoom level of the mapfield?

    How will keep the exact location of the marker in the mapfield according to change of zoom level?

    any idea?

    Hi Hagen, thanks for the answer...

    The question that I faced is almost done.

    Solution:

    When I opened mapfield, I'm storing the coordinates (from google service in accordance with the criteria) in a vector. And I created that much Bitmapfield of objects and store in another vector. Just by adding the fields to the Manager uses these vectors.

    To get the corresponding points in the map screen, used

    xyRect = new XYRect [limit];
    for (int i = 0; i)< limit;="" i++)="">
    XYPoint fieldOut = new XYPoint();
    String QualifiedCoordinates = coordinateHistory (QualifiedCoordinates)
    .elementAt (i);
    moveCord = string;
    mapField.convertWorldToField (String, fieldOut);
        
    xyRect [i] = new XYRect (fieldOut.x
    -(VFM.getField_(i_+_1).getWidth () / 2), fieldOut.y
    (-vfm.getField (i + 1) .getHeight (42, 40));
    cord = null;
       
        
    }

    xyRect array, we will get the position. And I call it after zoom and pan the map to redraw the markers according to the movement of the map and the zoom level. Because I used bitmapfields, I removed all the fields Manager and redesigns...

    Hope it will be useful...

  • BB 10 Mapfield API

    Hi guys,.

    I concentrate on BB10 and try to build a work around with SDK WebWorks. I do a search for how can I use BB maps in my application to display a location on the map.

    I couldn't find any documentation on Mapfield API. Anyone know where I can find?

    See you soon

    great! Thank you

  • use of MapField

    I have a few randomly placed points around these coords:

    Coordinates c = new Coordinates(43.474833333333336, -80.53919861111112, 0);mapField.moveTo(c);
    

    I replaced the method object field to display the points and a cursor centered on the screen. The field must contain the size full screen.

    The cursor is always painted in the center of the field (160-(CURSOR_W>>1), 120-(CURSOR_H >>1)), CURSOR_W and CURSOR_H, the width and height of the cursor bitmap. This image appears correctly, same zoom or scroll.

    Now, to view the points, I use MapField.convertWorldToField (coordinates, XYPoint). This method is suppoused to return the field stored in XYPoint passed as parameter values. The documentation indicates that these values are 'The point of ouput converted, in pixels', so they could be used within the method of the overloaded field object in order to draw the points. However, this is not true, and the values returned are far outside the drawing area. This is a sample:

    Coordinates: 43.48645156501891,-80.52758037942554
    Position on the field: x: 849, y:-1162
    Coordinates: 43.48623388220653,-80.52779806223793
    Position on the field: 834 x, y:-1140
    Coordinates: 43.48658593723019,-80.52744600721427
    Position on the field: x: 859, y:-1175
    Coordinates: 43.48694874161948,-80.52708320282498
    Position on the field: x: 886, y:-1211
    Coordinates: 43.48721479814182,-80.52681714630263
    Position on the field: x: 905, y:-1238

    What I am doing wrong? I think that the MapFieldDemo does the same thing, then why is not ' work n here?

    EDIT: I'm stupid. Random points were, in fact, up to now, it's why they have not been posted.

    Code above contains an error. The last line should be like this:

    super.setZoom(++zoom);
    

    This action solves the problem to zoom. But this does not solve the problem of centering. To properly adjust the card, you should fill it with positions after posting it. For example:

    //On your MainScreen constructor, perform instantiation of your MapField and add it empty to the Screen.
    
    // Then laterprotected void onUiEngineAttached(boolean attached) {    super.onUiEngineAttached(attached);    if (attached) {        // Perform here map initialization    }}
    

    It worked for me.

  • Need box Lat Long in MapField OS6.0

    Hello world

    I want to find the left, right, up, card low latitude longitude,

    I used the MapDimentions and MapField API 6.0.

    Using,

    mapDimentions.getbottom (); It will give me the lower coordinate. or as getleft, gettop...

    but it will not change when I moved to the card.

    I need a coordinated box or lat lon(all four) and also, this will change when the card installs...

    Thank you

    Here's the first corner:

    //Just creating a new Coordinates object, the values don't matter
    Coordinates topLeft = new Coordinates(0,0,Float.NaN);
    //The field point in pixels that you want to convert, this is where you put your four corners
    XYPoint coords = new XYPoint(0, 0);convertFieldToWorld(coords, topLeft);
    

    After this topLeft will be your latitude and longitude of the upper-left corner of your map. I hope this helps!

  • Creating markers on the MapField.

    Hello world.

    I am developing an application that uses a blackberry MapFiled. Here I'm looking forward to keep multiples of the marker for the given latitude and longitude multiples. Here are the options that I give to the MapFiled.

    (1) the user can move the map along all directions.

    (2) double tap helps the user to zoom and zoom out of the map. (very similar to google maps)

    I couldn't find an option to keep the markers by using MapFiled. Please advice me the rite solution.

    Hi all

    I found a solution using MapFiled. Please check the following code.

    protected void paint (Graphics graphics) {}
    Super.Paint (Graphics);
    If (myLocation! = null) {}

    Coordinates co = mapField.getCoordinates ();
    co.setLatitude (Double.parseDouble (myLocation.getLat ()));
    co.setLongitude (Double.parseDouble (myLocation.getLng ()));
                    
    XYPoint point = new XYPoint();
    mapField.convertWorldToField (co, point);
                    
    Image bitmap bitmap = Bitmap.getBitmapResource (myLocation.getImageName ());
    graphics.drawBitmap (point.x, point.y, bitmap.getWidth (), bitmap.getHeight (), bitmap, 0, 0);

    }

    }

  • MapField hangs if BB Maps not installed

    I thought I'd try this as a new thread:

    I checked that there is a dependency between the MapField class and the BB Maps app.

    If BB Maps is uninstalled, then Mapfield Builder crashes and vice versa.

    I did this experiment on the storm less than 4.7% and the 8330 under 4.5.

    I found this problem originally on the AT & T "BOLD" as it is without BB cards installed.

    It is a problem of HUGE in my opinion software architecture.

    More information anyone?

    What is the workaround? -make all our users install BB Maps?

    I'd appreciate any comments or audits.

    OLAF

    There is just no real API BB for Google not maps - I run the program using ApplicationManager.

    There is a hack to run Google MAps here:

    http://www.BlackBerryForums.com/developer-forum/143263-heres-how-start-Google-maps-landmark.html?HIG...

    If neither are installed, we have a dialog box asking the user to install one or the other.

    You may be able to install BB Maps on the device from AT & T, but in my experience the theme AT & T still hides the icon and prevents the application to be started by the user (although you can still use the MapField if you are on 4.6 or later).

  • adjust the Bitmap width and height in MapField

    Hi all

    I paint circles around a point of the situation in the MapField as in the code below:

     public void drawCircleMap(int [] radius){       int i = 0;
            Graphics graphics = null;
            int x2,y2;
            bmparr = new Bitmap[radius.length];
            for(int j=0;j
    
    protected void paint(Graphics graphics) {
            super.paint(graphics);
    
            for(int i =0 ;i < bmparr.length;i++)
            {
                graphics.setGlobalAlpha(100);
                graphics.drawBitmap(0, 0,  bmparr[i].getWidth(), bmparr[i].getHeight(), bmparr[i], 0, 0);
            }
    }
    

    I want to draw 4 circles, now I have more number of circles, draw the card seems to falter, can someone please tell me how can I solve this problem?


  • White screen in mapfield after zoom in

    Hi all

    I am getting white screen in mapfield after zoom in...

    I tried to move the latitude and longitude of the mapfield, I used to open the mapfield.

    Any idea.

    Hi M Sohm, thanks for the answer...

    Use the BB 9000 "BOLD" and S/w version is 4.6

    The issue that I was facing is now resolved. It was because of the null pointer exception. I use Bitmapfields, to draw locations. When to perform a zoom or pan down, then the x, position y fields become a negative value. so I have limited drawing markers, that are out of the display area...

    Thanks M Sohm for answer...!

  • ConvertWorldToField of MapField (nobody XYPoint, XYPoint fieldOut) does not work

    Hello

    I move the MapField to some details which I converted in full as degrees * 100000. Then the MapField is centered around the correct location. Then I call convertWorldToField (XYPoint, XYPoint) with the same integers, but the point of worldOut's values about 20000 20000 or s.th. Like this. It was s.th. wrong and I don't know why.

    Hagen

    Edit: Oops, you can map-> latitude x, but you can also map x-> longitude. That's all.

    Solved

  • MapField show a mask stripped map

    Hello

    I've implemented a MapField in my application, and only at the beginning, it shows a clear green mask scratched on the map. I tried to update the map with map.mapUpdateView () and expand it out on, but it does not help. Only when I move the trackball mask disappear.

    What is the problem here? How can I remove this striped mask at the beginning?

    Thank you.

    Andy

    Here is a picture of the problem:

    Screenshot of the map

    But it solved! I packed only the loading of the things that are needed later for the MapField, in a thread and there in ' UiApplication.getUiApplication () .invokeLater (new Runnable() {...} ".") " It helped for me.

  • MapFields on the Torch 9800

    Hi all

    I recently started working on a BB application, up to now, the tools are proved very useful and support online concise in answering the questions.

    On that note, I encountered a problem with the 9800 Torch Simulator. I can't get MapFields to display, I tried my own implementations and application examples. The app will expire after 60 s and generates an InterruptedException. It shows a gray screen with "Download" at the top left and then nothing happens. I tried the internet connection on the phone and it is functional

    I tested the same MapField Applications with other simulators and have not had any problems.

    Thanks in advance,

    It turns out that my network actually did not work properly. If I would have used the browser, it would have been obvious that the connection was not working.

    I tried connecting to the facebook application that managed somehow. Nevertheless, I solved my problem, for later use. The torch 9800 obliged me to connect to the network default WiFi to connect to the network.

  • Custom location markers MapField will not Center

    Hi all

    I am facing a problem where the location for my custom MapField (OS 5.0) markers are not perfectly centered on the map. Instead, they always appear in the same place, which is a little lower and more to the right of the Center.

    I use the method object of my MapField custom to draw markers.  Can we see what might be the culprit?  Thank you!

    protected void paint(Graphics graphics) {
        super.paint(graphics);
    
        if (vector != null) {
            for (int i = 0; i < vector.size(); i++) {
    
                LocationsObject loc = (LocationsObject) vector.elementAt(i);
    
                Coordinates coords = getCoordinates();
                coords.setLatitude(Double.parseDouble(loc.getStrLocationLatitude()));
                coords.setLongitude(Double.parseDouble(loc.getStrLocationLongitude());
    
                XYPoint point = new XYPoint();
                convertWorldToField(coords, point);
    
                Bitmap bitmap = Bitmap.getBitmapResource("location_marker.png");
    
                graphics.drawBitmap(point.x, point.y, bitmap.getWidth(),bitmap.getHeight(), bitmap, 0, 0);
    
            }
        }
    }
    

    I think I know what is happening here. Will do my best to explain.

    Assume that your brand image is of size 10 x 10. And the size of your device screen 480 x 360. Now, you want to put the marker in the center of the screen that will be (240 180) in our case. Now, when you call the drawbitmap, you will be probably development of marker (0,0) to (240 160) screen image. Method of painting will start shooting your bitmap of this point.

    To center the image of marker perfectly on (240 160), it must be placed on (235 155). Here I subtracted (marker.width/2, marker.height/2) from the center point. In our example, the marker is 10 x 10. So you get (240 160) - (5.5) = (235, 155)

    In the code you prob you have to do something like that.

    int markerX = point.x - bitmap.getWidth () / 2;
    int markerY = point.y - bitmap.getHeight () / 2;
    graphics.drawBitmap (markerX, markerY, bitmap.getWidth (), bitmap.getHeight (), bitmap, 0, 0);

    I hope that this is the only problem.

  • Fatal error: installation MapField demo on blackberry "BOLD"

    Hello world

    I have compiled the mapfiled demo application in v5.0.0.5 studio for Blackberry development. Obtain the signature of code required. Then I have to install the application on my Blackberry "BOLD" (build v4.6.0.301).

    Blackberry Desktop Manager showed a fatal error during installation. Does anyone know how to install the demo mapfield successfully on a BB "BOLD".

    Roger.

    Java blackBerry applications are compatible before, but is NOT backward compatible. When you build a Java application using a specific version of the BlackBerry Java development tools - the application will not work on the same version of the software BlackBerry Device and superior. When you have built the application using 5.0 development tools - it works on a device 5.0 (which do not yet exist).

    To run the application on a "BOLD", you will need to compile it using the 4.6 or development tools earlier.

  • Several markers in the mapfield

    Hi, using the following code shows to draw marks in the mapfield.

    Coordinates cordinate = new Coordinates (latitude [i], longitude [i], (float) 0.0);
    imgW int = 0;
    imgH int = 0;
    If (null == xyRect) {}
    _mapField.convertWorldToField (cordinate, fieldOut);
    imgW = imgRed.getWidth ();
    imgH = imgRed.getHeight ();
    xyRect = new XYRect (fieldOut.x - imgW/2, fieldOut.y
    -imgH, imgW, imgH);
    }
      
    setExtent (width, height);
    If (getFieldCount() > 0) {}

    setPositionChild (getField(i+1), xyRect.x, xyRect.y);
    }
    }

    but I'm not able to see all the brands in the mapfield.

    any idea?

    Thanks in advance

    Solved...

    http://supportforums.BlackBerry.com/T5/Java-development/MapField-convertWorldToField/m-p/464928#M929...

Maybe you are looking for

  • W700 touchscreen works do not (hardware problem)

    My Tablet seems fine, but I can't use the touch screen. The first time it happened it was December 18, and has happened for windows session. It seemed to be a stroke of luck.  Then I thought it was drivers or something.  I actually did a "System Rest

  • I use Windows Xp OEM installation disc on another computer, if I have updated from Xp to Vista on a computer?

    I built a computer with Windows Xp OEM and then upgraded to Vista Home Premium SP1. I want to know to build another computer with the same Windows Xp OEM installation disc, is this possible?

  • Brightness contol HP Pavilion 17 '' screen

    New Pavilion 17 "came with Win OS 8.1.   After extreme frustration 2 weeks with OS 8.1, with the advice of the part 3ed professional tech, had him rub off 8.1 and install Win 7 Pro OS.   This caused a loss of functionality of screen brightness, the d

  • Minesweeper does not

    I'm going to start a game of Minesweeper, but before closing, the games freezes and unresponsive.  I tried to uninstall the Minesweeper, but when I uncheck the Minesweeper program from the directory of games the program hangs and will not let me cont

  • ThinkVantage button (s) do not work

    Somehow, I lost the use of the blue "ThinkVantage" button on my R61i... also, if I click on the desktop icon it doesn't... another words, I don't have have the use of the ThinkVantage software/Productivity Center.  Y at - it somewhere that I can find