473,657 Members | 2,516 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Anyone knows how to display a marker using J2MEMap?

108 New Member
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 967

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

Similar topics

0
1398
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 hand. I have succesfully used pexpect to do this in a script on Linux, a bit like this: import pexpect p = pexpect.spawn("/bin/sh") p.sendline("passwd testuser\r") pw = randomPassword()
11
2056
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 { private : date_struct m_data;
2
1977
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
15490
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 source code Thanks in advance
1
1294
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 the Word Doc files into PDF files as they are uploaded.
4
1850
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 http://cdburnerxp.se/cssparse/css_optimiser.php. it really works after topStyle did the job. for HTML im using SpaceAgent. its nice but i think there is someyhing much more fowerfull.
2
1522
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
1071
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 aspx. Anyway just wondering if there is a way to dymanically change the name of the form, for example to put the current date in it like (report022007). -- Paul G Software engineer.
2
2982
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 enter username password again, cause of your coding has username and password "Our server asks username and password for external communication"). Thank you in advance for anyone read this question. Please, anyone has this idea to share, Thanks a...
12
1623
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 choice; printf(" Main Menu\n"); printf(" =========\n\n"); printf("1.Simple Editor with Speed Calculation\n"); printf("2.Simple Spell Checking\n");
0
8420
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8842
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8516
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.