0

I am developing an iPhone app that works with phonegap. I want to connect it with the GIS map service of ArcGIS,esri.

I saw some examples how they adding maps. They creating a xib files and designing there views and connect it to a ViewController...what i want is to add a map to a WEBview.

after I added all the frameworks and all the stuff i tried:

MapViewDemoViewController *test = [[MapViewDemoViewController alloc]initWithFrame:CGRectMake(20,95, 285, 285)];
[[self.webView superview] addSubview:test]

but i am getting an error saying:

Incompatible pointer types sending 'MapViewDemoViewController *' to parameter of type 'UIView *'

'MapViewDemoViewController' may not respond to 'initWithFrame:'

maybe someone have some experiance with those maps?

vadim
  • 119
  • 3
  • 14

1 Answers1

0

Yes, you need to replace:

[[self.webView superview] addSubview:test]

With

[[self.webView superview] addSubview:test.view]

To fix the compiler warning, but I'm a bit suspicious... this doesn't seem like a sensible way to add a map to a web view. It looks quite wrong.

wpearse
  • 2,422
  • 2
  • 29
  • 30