ArcGIS Mobile WebMap sample doesn't work with custom basemap

730
4
Jump to solution
05-02-2012 02:15 PM
SobodhDangwal
New Contributor III
Hi There

I am having trouble displaying the ArcGIS.com web map mobile sample http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm .

It works if I use the open street map as base map but doesn't work with our own base map which is on NZTM projection.

The other web map sample works fine.

Any help will be greatly appreciated.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
SobodhDangwal
New Contributor III
You need to add this line of code to the sample:

 esri.config.defaults.geometryService = new esri.tasks.GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");


Add it in the function, function jQueryReady()

This service is needed to display your web map. The sample will be updated to include the extra line of code the next time help is updated.

Thanks,

Mike


Cheers
Thats working fine now

Thanks

View solution in original post

0 Kudos
4 Replies
MikeMinami
Esri Notable Contributor
Which mobile platform are you using? iOS, Android...?
Have you downloaded the mobile app or are you using the native web browser on the mobile device?
Which sample are you using? The link does not go to a specific sample.

Are you saying your web map displays fine in the browser with your custom basemap, but not when you attempt to view it on your mobile device?

Perhaps the easiest thing to do is to share your web map publicly so I can look at it.

Thanks,

Mike
0 Kudos
SobodhDangwal
New Contributor III
Which mobile platform are you using? iOS, Android...?
Have you downloaded the mobile app or are you using the native web browser on the mobile device?
Which sample are you using? The link does not go to a specific sample.

Are you saying your web map displays fine in the browser with your custom basemap, but not when you attempt to view it on your mobile device?

Perhaps the easiest thing to do is to share your web map publicly so I can look at it.

Thanks,

Mike



Sorry Mike, Here is the right link http://help.arcgis.com/en/webapi/javascript/arcgis/demos/mobile/mobile_arcgis.html

I am trying it on safari on iPhone, not a native app, just js mobile sample.

Here is the WebMap id I am using (shared publically) 612b0e7fedbe4af7b96884b600b3a26a

If I use the esri sample as it is it works on the iPhone safari browser, however if I use the above id it won't work on the browser.

The only time it works with my custom map when I don't use my base map but a open street map or esri map. So in another words it will work if I create a webmap using openstreetmap as basemap with our operation layers (NZTM).

However it wont work if I create a webmap using our basemap (NZTM) with our operation layers (NZTM).

Let me know if its not very clear


cheers
0 Kudos
MikeMinami
Esri Notable Contributor
You need to add this line of code to the sample:

 esri.config.defaults.geometryService = new esri.tasks.GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");


Add it in the function, function jQueryReady()

This service is needed to display your web map. The sample will be updated to include the extra line of code the next time help is updated.

Thanks,

Mike
0 Kudos
SobodhDangwal
New Contributor III
You need to add this line of code to the sample:

 esri.config.defaults.geometryService = new esri.tasks.GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");


Add it in the function, function jQueryReady()

This service is needed to display your web map. The sample will be updated to include the extra line of code the next time help is updated.

Thanks,

Mike


Cheers
Thats working fine now

Thanks
0 Kudos