473,387 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Anyone knows how to display a marker using J2MEMap?

108 100+
I want to load a map and display a marker on it. However, the map is loaded but the marker is not visible ..Anyone knows what the problem is?
Expand|Select|Wrap|Line Numbers
  1.       UtilMidp.checkMIDP(this);  //Initialise the utility library...
  2.         m_map=new MapDisplay();
  3.         m_display=Display.getDisplay(this);
  4.         GenericOverlay openStreeMap=new GenericOverlay("OpenStreeMap","http://tile.openstreetmap.org/!z!/!x!/!y!.png");
  5.         //GenericOverlay openStreeMap=new GenericOverlay("GoogleMap","http://mt0.google.com/vt/x!&y=!&z=!.PNG");
  6.         m_map.setMapProvider(0,openStreeMap);
  7.  
  8.         Track t=Track.getTrack(null, "Sample...");
  9.         //henson.midp.Float x= 2;
  10.         //Float x = new Float((long)(90));
  11.         //Float z = new Float((long)(190));
  12.         float y =37.803f;
  13.         long lat = (long) Double.parseDouble("20");
  14.         long lon = (long) Double.parseDouble("52");
  15.         //m_map.gotoLonLat(x,  y);
  16.        // m_map.gotoLonLat(x,y);
  17.         Float x = new Float(lat);
  18.         Float z = new Float(lon);
  19.          Marker m=new Marker(x,z);
  20.          //m.setLonLat(henson.midp.Float.SQRT3, henson.midp.Float.SQRT3)
  21.        // m_map.
  22.         m_map.gotoLonLat(90,190);
  23.  
  24.  
  25.         System.out.println(m_map.getDist());
  26.         System.out.println(m_map.getZoom());
  27.  
  28.        // Marker l=new Marker(x,y );
  29.  
  30.  
  31.         t.addMarker(m);
  32.         //m_map.displayTrack(t, false);
  33.  
  34.         m_display.setCurrent(m_map.getCanvas());
  35.     }
  36.  
  37.  
  38.  
Mar 25 '11 #1
0 960

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Steve Horsley | last post by:
I am trying to automate changing of a password for a particular user account (for use by scripts, not people). I am trying to use the command "passwd testuser" as root. Of course I can do this by...
11
by: Aing | last post by:
Anyone knows what can be cause of this problem? //////////////////////////////////////////////////////////// typedef struct _date_struct { int date,month,year; }date_struct; Class Date {...
2
by: KevinGPO | last post by:
Just wondering if anyone knows if there are converters to convert from: MS Visual C++ 6.0 or MS Visual Studio 2003 project files into UNIX autogen/configure/make files?
1
by: Mamatha | last post by:
Hi I want to develop a small application in C#.net . I want to display video using webcam in C#.net application,how can i code this? I am very new to C#.net,please give me any related links or...
1
by: Shapper | last post by:
Hello, Does anyone knows a component to convert an Word DOC File to Adobe Acrobat PDF file? I am creating a web site where people upload word Word DOC files to the server. I need to convert...
4
by: neoswf | last post by:
Hey Does anyone knows a powerfull and relaible HTML / JS / CSS Optimization tool ? right now im using stylePro for optimizing CSS and afterwords optimizng it using...
2
by: khajeddin | last post by:
hi there : is here anyone who knows how can i access to sevral "C pragraimg exercises" or "C programing problems".anyone knows any website?
5
by: =?Utf-8?B?UGF1bA==?= | last post by:
working on a difficult problem, using crystal reports and when the report is exported for the file save it uses the name of the webform that the control is on, like default.aspx, but without the...
2
by: minhtran | last post by:
Hi All Anyone knows how to code(ASP.NET, C#,VB.NET) as to send username and password to Proxy Server required to reach web page (That means you code as programming automatically get web page without...
12
by: micmicmic | last post by:
I can't link to the other file called A1.c, A2.c and A3.c respectively. Does anyone knows how to link to the other .c file from the following .c file? #include<stdio.h> int main() { int...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.