".objc_class_name_MKPinAnnotationView", referenced from:
literal-pointer@__OBJC@__cls_refs@MKPinAnnotationView in Map.o
Maybe You had this error before. I don't know what that means. Anyone
have an idea ???? :-(
And you add mapkit to your project ?
I am just like a newbie in the iphone world. I'm trying to see all
functionnalities. I really like this framework but i don't understand
everything. when you said :
" to reset and hide the map (I call it via a tabbar) PhoneGap.exec
("Map.reset"); "
what do you do, how can you add a tabbar with the framework
Phonegap ??? directly in XCode, maybe you can show me a example or a
way to do it.
Merci par avance.
I am summer from Taiwan, I had try your code, but I have 2 error,
1. error:expected specifier-qualifier-list before 'AddressAnnotation'
2. error:'myAnnotation' underclared (first use in this function)
can you help me to solve, please!
And
did you include the Mapkit libraries into your project libraries ?
thanks for your help, I already fix my trouble...
but the next question is how can I show the map in my html &
javascript code???.....it's my first time to code Phonegap....so I
don't know very much to use it, could you mail the sample to
me??...thanks very much~~
in the listed point, function 3) is called by the tabbar, so the user
can go back to the app "normal" webview. Fct 0)1)2) is called by any
javascript you want
0) To initialize PhoneGap.exec("Map.init")
1) To add points
PhoneGap.exec("Map.addPoint",data[i].latitude,data[i].longitude,data
[i].title,data[i].title,"purple","processmapclick('"+data[i].nid
+"')");
2) to display the map
PhoneGap.exec("Map.center",geoParams.lat,geoParams.long,0.4,0.4);
3) to reset and hide the map (I call it via a tabbar)
PhoneGap.exec("Map.reset");
ex:
try {
if (PhoneGap){
PhoneGap.addConstructor(function(){
uicontrols.createTabBar();
uicontrols.createTabBarItem("georeset", "Back","02-redo.png",
{onSelect: function() { PhoneGap.exec("Map.reset"); }} );
uicontrols.showTabBarItems("georeset");
uicontrols.showTabBar();
}
}catch (err){
//whatever
}
http://code.google.com/p/jqtouch/issues/detail?id=44#c46
Those instructions were for the same thing although posted to the JQTouch group as a fix to google maps api v3 inability to work within the JQTouch (or really, any webview) well.
Jann
> --
> You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
>
> For more info on PhoneGap or to download the code go to www.phonegap.com
I try to create a TabBar, my code is like below, it can alert start
and finish, but didn't show any tabbar in my simulator...what wrong
with me??....should I do any config??
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta name="viewport" content="width=320; user-scalable=no" />
<meta http-equiv="Content-type" content="text/html;
charset=utf-8">
<title>Test</title>
<link rel="stylesheet" href="master.css" type="text/css"
media="screen" title="no title" charset="utf-8">
<script type="text/javascript" charset="utf-8" src="phonegap.js"></
script>
<script type="text/javascript" charset="utf-8">
function setupToolbars(){
try{
var toprated = 0;
navigator.notification.alert("start");
uicontrols.createToolBar();
uicontrols.setToolBarTitle("Tool Bar");
uicontrols.createTabBar();
uicontrols.createTabBarItem("toprated","Top
Rated","tabButton:TopRated",{onSelect:function(){
navigator.notification.alert("Top Reated select");
}});
var history = 0;
uicontrols.createTabBarItem("history","History",null,
{onSelect:function(){
navigator.notification.alert("History select");
}});
uicontrols.showTabBar();
uicontrols.showTabBarItems("toprated","history");
navigator.notification.alert("finish");
}catch(err){
alert(err);
}
}
function preventBehavior(e){
e.preventDefault();
}
PhoneGap.addConstructor(function(){
setupToolbars();
document.addEventListener("touchmove",preventBehavior,false);
});
</script>
</head>
<body id="stage" class="theme">
<div id="Page1">
<h1>Tab Bar</h1><br>
</div>
</body>
</html>
I don't know what happen, but when I copy my code to default html page
(index.html), my tabbar appear~~~
but if I put the code to another page, it's disapper.......
but anyway~~ thanks for your help very much...
Thanks for sharing your bit of code, I bet tons of non-obj-c people as
myself will be grateful to you.
Had one question though, have you tried to run it with the EDGE
version? Just tried but the file structure/code organization changed a
bit and I believe cause of that just changing the referenced Map.m,
Map.h doesn't work anymore. Had it working in 0.8 no problems but now
I'm stuck - wanted to work with edge for the future app as I'd love to
use some of its features - though at the same time we'd love to use
your contribution :)
Oh and just a tiny idea, maybe parametrize the initializer to give an
option to pass which type of map do we want to display? Found in your
code that you were changing it be uncommenting which enum from MKType
to use :) would be sweet if you could pass it while displaying the map
from JS
thanks again,
Tomas
The map.h and map.m files haven't changed at all I recon but the way
they are linked did - they aren't directly accessible from your
phonegap project anymore - all the core classes were separated from
what PhoneGap dev will see in his PG based project. There might have
been more changes to it which are beyond my scope of understanding Obj-
C.
The thing is that everything seems to load fine - there are no
compilation errors, just when I click the html element which should
call the map the simulator crashes and the debugger throws an unknown
exception error.
T.
Did you include the mapkit framework, I supposed otherwise the project
wouldn't even build ...
Did you try to display a map directly = without using other native fct
like tabbar, or geolocation ...
Mapping is a major feature of mobile platforms in general (and the iPhone in particular). It is EXTREMELY lacking in .8 Someone (Marc), puts together a working prototype of a solution -- and gets NO RESPONSE from any of the developers of PhoneGap. Others (like me) ask specific questions aimed at the developers and get no response. (Like the one on location services this morning. Asked almost 2 weeks ago as well..and no answer then either) It seems that PhoneGap gets all this good press, developers really start using it, the forums get going and the PhoneGap developers go away (or assume that they do not need to answer questions regarding a major missing feature).
Marc has openly placed his code out there for use of all. PhoneGap developers should immediately incorporate this mapping code and replace the paltry one-function feature we had in the past. Are there memory leaks in it? Is is written wrong? Is he breaking any rules that would stop an app from being accepted by the app store? He has asked for it to be accepted and for someone to look at it who knows Objective-C better then he. HE DID YOUR WORK FOR YOU, DEVS. Where are you?
Come on, devs... This is obviously a needed feature. The code is written. What is to stop it from being immediately added to the codebase of PhoneGap? To be honest, the lack of any PhoneGap dev 'noise' on this list is disappointing. I know this is a sideline for most of the PhoneGap devs...but if you look out there at the postings you will find that many of us software developers actually chose this platform to port (or create) software on. Many of us have bosses to please. For some of us it is for fun, for other -- profit. Shouldn't our questions get answered? Aren't we the ones that got PhoneGap noticed? The reason Perl (for instance) got so huge is that Larry Wall got involved in the day-to-day question/answers. Same thing with Linux. I would hope PhoneGap could learn from things like that. When dealing with a brand-new platform you must have original-developer involvement to both answer questions and prosthetize.
No offense meant by any of this...and I am not mad. I am puzzled. Thoughts?
Jann
managed to debug it a beet deeper and I've found out that the
exception was raised by the execute command that the method called is
unknown - that would mean that I was right in the first post, that
because the way the way all the classes are included now changed it's
not that easy to *hack* the PhoneGap code anymore.
Any tips from the authors maybe? I've changed the classes in the
folder from which I've installed the PhoneGap EDGE templates and all
the xcode project creation stuff (GREAT IDEA!) I guess that I'd have
to edit the template itself somewhere deeper to apply the changes to
the mapping system (Map.h, Map.m)?
Oh and yeah it was just the map without anything extra and I did
include the mapkit framework.
Tom
I am new to phonegap and to mobile development as a whole though have
some experience in web development.
Pardon me if m missing something but why are we going for a full
screen map? Cant we just call the API and do regular ajax calling for
search n stuff and embed it in a html page like we do in websites.
This way we can always have a back button so the application wont
quit.
Experts may throw some light on this...
Venky
Again : thanks for your work .. you keep many of us from the nightmare
of dealing with objective-c ...
++
Marc
> Pardon me if m missing something but why are we going for a full
> screen map?
because (unfortunately) that's not the way mapkit implement
googlemap. They only open in full screen (at least from what I know).
> search n stuff and embed it in a html page like we do in websites.
> This way we can always have a back button so the application wont
> quit.
You can embed gmap, but you cannot use the gmap api, which require a
key, which can not work on phonegapapp(or any iphone app)
and embeded maps have few options and is very slow ..
rem: good info for the localhost .. didn't know that.
Venky
The goal was to not need to modify the lib project. If you modify
phonegap lib, then you are stuck if there are updates and you will
have to manually merge code.
I assume map.m is implementing phonegapcommand.
Let me know if you still have issues.
Jesse
Sent from my iPhone
Not to mention Google stepping foot in yet ANOTHER market Apple wants to dominate (movie rentals)
Think about it... how soon after Apple drops Google do you all think Google will fire back and kill all the apps accessing Google Maps illegally?
Mapkit WILL work in the future. There is nothing using it's facilities that lock it to a Google interface. With Frameworks that are 'supported' by Apple, it is almost always guaranteed for them to (transparently - hopefully) enable it to be used with another provider. Your App would continue to work regardless of any 'business' decisions Apple may make in the future. (can you say Bing or Placebase?)
:) That is my hope anyway. Only time (and Bing or Placebase) will tell. I can see apple foaming at the mouth at having Aerial shots of (Microsoft's Bing) neighborhoods to use on the iPhone vs Satellite shots (Google)
(not that I love Microsoft...but can you imagine Bing's photos with Apple's interfaces? WOW!)
Jann
An alternative is to use the google map api with something like :
php:
$rep=file_get_contents("http://maps.google.com/maps/geo?q=$pcode&gl=
$country&key=GMAPAPIKEY");
I let you translate it in javascript/json
That allow you to get an array of long/lat that you can insert into
the generated mapkit map.
And "ass" said before in this thread that "localhost's dont need a
gmap api key"
On 01/22/10 11:03, venky wrote:
> Hi hanger,
>
> m working with mapkit and able to launch map with jqtouch thread.
> Just wanted to know is there anything like AJAX local search which is
> typically used with google maps API so we can do a search on map in
> mapkit...
> Bear with my english its not perfect.
>