In [5]:
from arcgis.viz import MapView
map = MapView(id='edb57051c4df4954a13085ecbf175f03')
map


The installed widget Javascript is the wrong version.

In [4]:
from arcgis.viz import MapView
map = MapView(id='74b77396fe10429496308ff195a2f992')
map


The installed widget Javascript is the wrong version.

In [15]:
import arcgis

Layer = arcgis.lyr
Mapservice = Layer.MapService
Mapservice.


  File "<ipython-input-15-6d82acd8edd6>", line 5
    Mapservice.
               ^
SyntaxError: invalid syntax

In [45]:
MapPalm.add_layer({"type":"MapService","url":"http://etest2.esri.nl:8080/arcgis/rest/services/Schiphol/IWF_Basemap_1/MapServer"})

In [37]:
import sys
items = gis.content.search()
for item in items:
    pMapPalm.add_layer({'url':'http://etest2.esri.nl:8080/arcgis/rest/services/Schiphol/IWF_Basemap_1/MapServer'})


   access='public'
   accessInformation=None
   _hydrated=False
   owner='Ernst_NL'
   culture='en-us'
   _portal=<arcgis._impl.portalpy.Portal object at 0x0000022E04FD1DA0>
   _workdir='C:\\Users\\WAGEMA~1\\AppData\\Local\\Temp'
   screenshots=[]
   thumbnail='thumbnail/thumbnail.png'
   name='Barriers_IWF'
   description=None
   licenseInfo=None
   industries=[]
   largeThumbnail=None
   tags=['barriers', 'IWF', 'Schiphol', 'ArcGIS', 'Service Definition', '.sd']
   properties=None
   modified=1474291487000
   numViews=36
   languages=[]
   numRatings=0
   guid=None
   spatialReference='RD_New'
   url='http://services.arcgis.com/emS4w7iyWEQiulAb/arcgis/rest/services/Barriers_IWF/FeatureServer'
   snippet='Stops en barriers tbv IWF Schiphol EGC2016'
   layers=None
   typeKeywords=['ArcGIS Server', 'Data', 'Feature Access', 'Feature Service', 'Metadata', 'Multilayer', 'Service', 'Hosted Service']
   extent=[[-180, -90], [180, 90]]
   documentation=None
   banner=None
   type='Feature Service'
   tables=None
   appCategories=[]
   _gis=<arcgis.gis.GIS object at 0x0000022E04FD1C18>
   numComments=0
   size=-1
   itemid='24d990ca91f84c90acf6207ab334f4c9'
   avgRating=0
   title='Barriers_IWF'
   id='24d990ca91f84c90acf6207ab334f4c9'
   created=1473258328000
   listed=False
   access='org'
   accessInformation=None
   _hydrated=False
   owner='beta_wagem007'
   culture='en-us'
   _portal=<arcgis._impl.portalpy.Portal object at 0x0000022E04FD1DA0>
   _workdir='C:\\Users\\WAGEMA~1\\AppData\\Local\\Temp'
   screenshots=[]
   thumbnail=None
   name='IWF_BMP_Alles-FCL-Zoom_KLM.mxd'
   description=None
   licenseInfo=None
   industries=[]
   largeThumbnail=None
   tags=['IWF']
   properties=None
   modified=1469630146000
   numViews=7
   languages=[]
   numRatings=0
   guid=None
   spatialReference=None
   url=None
   snippet=None
   typeKeywords=['2D', 'ArcGIS Server', 'ArcMap', 'Map', 'Map Document', 'mxd']
   extent=[]
   documentation=None
   banner=None
   type='Map Document'
   appCategories=[]
   _gis=<arcgis.gis.GIS object at 0x0000022E04FD1C18>
   numComments=0
   size=-1
   itemid='3b849d6c2f5f458e9deab649cecda993'
   avgRating=0
   title='IWF_BMP_Alles-FCL-Zoom_KLM'
   id='3b849d6c2f5f458e9deab649cecda993'
   created=1469630146000
   listed=False
   access='org'
   accessInformation=None
   _hydrated=False
   owner='beta_wagem007'
   culture='en-us'
   _portal=<arcgis._impl.portalpy.Portal object at 0x0000022E04FD1DA0>
   _workdir='C:\\Users\\WAGEMA~1\\AppData\\Local\\Temp'
   screenshots=[]
   thumbnail='thumbnail/ago_downloaded.png'
   name='IWFOffline_VPR_KLM.gdb.zip'
   description=None
   licenseInfo=None
   industries=[]
   largeThumbnail=None
   tags=['IWF']
   properties=None
   modified=1469630064000
   numViews=4
   languages=[]
   numRatings=0
   guid=None
   spatialReference=None
   url=None
   snippet=None
   typeKeywords=['File Geodatabase']
   extent=[]
   documentation=None
   banner=None
   type='File Geodatabase'
   appCategories=[]
   _gis=<arcgis.gis.GIS object at 0x0000022E04FD1C18>
   numComments=0
   size=-1
   itemid='77deb17672424dda96a7fd82d8ef7128'
   avgRating=0
   title='IWFOffline_VPR_KLM.gdb'
   id='77deb17672424dda96a7fd82d8ef7128'
   created=1469630064000
   listed=False
   access='public'
   accessInformation=None
   _hydrated=False
   owner='beta_wagem007'
   culture='en-us'
   _portal=<arcgis._impl.portalpy.Portal object at 0x0000022E04FD1DA0>
   _workdir='C:\\Users\\WAGEMA~1\\AppData\\Local\\Temp'
   screenshots=[]
   thumbnail='thumbnail/thumbnail.png'
   name='IWF_BMP_Barrier.lpk'
   description='barrier'
   licenseInfo=None
   industries=[]
   largeThumbnail=None
   tags=['barrier']
   properties=None
   modified=1473863872000
   numViews=2
   languages=[]
   numRatings=0
   guid='5AEE125A-13FF-452D-A031-AF0319AA9CFF'
   spatialReference='None'
   url=None
   snippet='barrier'
   typeKeywords=['ArcGIS Explorer', 'ArcGlobe', 'ArcMap', 'Data', 'Layer Package', 'lpk', 'SDE Feature Class']
   extent=[[4.76163776372601, 52.3087132108463], [4.76577639296978, 52.3118886597177]]
   documentation=None
   banner=None
   type='Layer Package'
   appCategories=[]
   _gis=<arcgis.gis.GIS object at 0x0000022E04FD1C18>
   numComments=0
   size=-1
   itemid='e91731ffa615428f82f50aa4c8ab3b02'
   avgRating=0
   title='IWF_BMP_Barrier'
   id='e91731ffa615428f82f50aa4c8ab3b02'
   created=1473863453000
   listed=False

In [43]:
MapPalm.add_layer({"type":"MapService","url":"http://etest2.esri.nl:8080/arcgis/rest/services/Schiphol/IWF_Basemap_1/MapServer"})

items = gis.content.search("IWF Basemap") for item in items: item


In [10]:
for item in items:map


Out[10]:
map

In [8]:
map_2 = gis.map("Schiphol")

In [34]:
map_2


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
TypeError: _handle_map_msg() takes 3 positional arguments but 4 were given
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
TypeError: _handle_map_msg() takes 3 positional arguments but 4 were given
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
TypeError: _handle_map_msg() takes 3 positional arguments but 4 were given

In [35]:
POILayeritem =  gis.content.search('IWF_POI_VLAKKEN','Feature Service')[0]
map_2.add_layer(POILayeritem)

In [19]:
map_2.__dict__


Out[19]:
{'_click_handlers': <ipywidgets.widgets.widget.CallbackDispatcher at 0x252e36336a0>,
 '_cross_validation_lock': False,
 '_draw_end_handlers': <ipywidgets.widgets.widget.CallbackDispatcher at 0x252e3633f28>,
 '_model_id': '7e80c54fa261417aab5d9050a8104fc3',
 '_trait_notifiers': {'background_color': {'change': [<function ipywidgets.widgets.domwidget.DOMWidget._deprecate_traits.<locals>.traitWarn>]},
  'color': {'change': [<function ipywidgets.widgets.domwidget.DOMWidget._deprecate_traits.<locals>.traitWarn>]},
  'config': {'change': [<traitlets.traitlets.ObserveHandler at 0x252ddca3e80>]},
  'font_family': {'change': [<function ipywidgets.widgets.domwidget.DOMWidget._deprecate_traits.<locals>.traitWarn>]},
  'font_size': {'change': [<function ipywidgets.widgets.domwidget.DOMWidget._deprecate_traits.<locals>.traitWarn>]},
  'font_style': {'change': [<function ipywidgets.widgets.domwidget.DOMWidget._deprecate_traits.<locals>.traitWarn>]},
  'font_weight': {'change': [<function ipywidgets.widgets.domwidget.DOMWidget._deprecate_traits.<locals>.traitWarn>]}},
 '_trait_validators': {},
 '_trait_values': {'_display_callbacks': <ipywidgets.widgets.widget.CallbackDispatcher at 0x252e3636860>,
  '_dom_classes': (),
  '_model_module': 'jupyter-js-widgets',
  '_model_name': 'DOMWidgetModel',
  '_msg_callbacks': <ipywidgets.widgets.widget.CallbackDispatcher at 0x252e36339b0>,
  '_property_lock': {},
  '_swipe_div': 'swipeDiv8G68O1',
  '_view_module': 'mapview',
  '_view_name': 'MapView',
  'addlayer': '',
  'background_color': None,
  'basemap': 'topo',
  'center': [52.31029839700051, 4.76027852100043],
  'color': None,
  'comm': <ipykernel.comm.comm.Comm at 0x252e36332e8>,
  'config': {},
  'end_time': '',
  'font_family': '',
  'font_size': '',
  'font_style': '',
  'font_weight': '',
  'id': '',
  'keys': ['_view_name',
   'font_family',
   '_dom_classes',
   'id',
   'layout',
   'background_color',
   '_swipe_div',
   '_view_module',
   'font_weight',
   '_model_name',
   'msg_throttle',
   'end_time',
   'width',
   'center',
   'mode',
   'visible',
   'addlayer',
   'font_style',
   'font_size',
   'color',
   'value',
   'start_time',
   'basemap',
   '_model_module',
   'zoom'],
  'layout': <ipywidgets.widgets.widget_layout.Layout at 0x252e3633710>,
  'mode': 'navigate',
  'msg_throttle': 3,
  'parent': None,
  'start_time': '',
  'value': 'Hello World!',
  'visible': True,
  'width': '100%',
  'zoom': 12},
 'basemaps': ['streets',
  'satellite',
  'hybrid',
  'topo',
  'gray',
  'dark-gray',
  'oceans',
  'national-geographic',
  'terrain',
  'osm'],
 'item': None}

In [19]:
from IPython.display import display

items = gis.content.search("webmap")
for item in items:
    display(item)


World Transportation
This reference map service provides a transportation and street name labels reference overlay that is particularly useful on top of imagery.Map Service by esri
Last Modified: September 30, 2016
8 comments, 13,306,759 views
World Imagery
This map service presents satellite imagery for the world and high-resolution imagery for the United States and other areas around the world.Map Service by esri
Last Modified: September 16, 2016
54 comments, 7,395,245 views
World Street Map
This map service presents highway-level data for the world and street-level data for North America, Europe, Africa, parts of the Middle East, Asia, and more.Map Service by esri
Last Modified: October 13, 2016
38 comments, 6,365,794 views
USA Topo Maps
This map service presents detailed USGS topographic maps for the United States at multiple scales.Map Service by esri
Last Modified: October 13, 2016
26 comments, 6,349,507 views
FEMA's National Flood Hazard Layer (Official)
Data from Flood Insurance Rate Maps (FIRMs) where available digitally. New NFHL FIRMette Print app available: http://tinyurl.com/j4xwp5eWeb Map by Robert.Gaines_FEMA4
Last Modified: August 30, 2016
6 comments, 4,004,666 views
World Ocean Base
This map is designed to be used as a basemap by marine GIS professionals and as a reference map by anyone interested in ocean data.Map Service by esri
Last Modified: September 01, 2016
2 comments, 3,689,855 views
2012 USA Tapestry Segmentation (Mature Support)
This map service shows the dominant lifestyle segment in an area in 2012, based on Esri's Tapestry Segmentation system.Map Service by esri
Last Modified: February 02, 2016
0 comments, 3,389,311 views
Bing Maps Hybrid
This web map contains the Bing Maps aerial imagery with labels web mapping service, which provides worldwide orthographic aerial and satellite imagery with roads and labels overlaid.Web Map by esri_en
Last Modified: December 11, 2013
0 comments, 3,190,872 views
Bing Maps Aerial
This map contains the Bing Maps aerial imagery web mapping service, which offers worldwide orthographic aerial and satellite imagery.Web Map by esri_en
Last Modified: December 11, 2013
0 comments, 3,105,237 views
Traffic
This map service presents near real-time traffic information for different regions in the world. The data is updated every 5 minutes. This map service requires an ArcGIS Online organizational subscription.Map Service by wkron
Last Modified: October 06, 2016
0 comments, 2,891,860 views

In [ ]:


In [21]:
map_2.item = "0f1a0b1640d2433abe25120a54efe7f8"
map_2


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
TypeError: _handle_map_msg() takes 3 positional arguments but 4 were given

In [24]:
mapitem = portal.content.search('World Cities', 'web map')[0]


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-24-205294146d2c> in <module>()
----> 1 mapitem = portal.content.search('World Cities', 'web map')[0]

NameError: name 'portal' is not defined

In [16]:
portal = GIS("http://www.arcgis.com", "beta_wagem007", "mawa2000")

In [17]:
layeritem = portal.content.search('IWF','Map Service')
layeritem


Out[17]:
[<Item title:"Passenger basemap - floor 0" type:Map Service owner:Schiphol_Administrator>,
 <Item title:"Passenger basemap - floor 3" type:Map Service owner:Schiphol_Administrator>,
 <Item title:"IWF_POI" type:Map Service owner:Schiphol_Administrator>,
 <Item title:"Passenger basemap - floor 1" type:Map Service owner:Schiphol_Administrator>,
 <Item title:"Passenger basemap - floor 2" type:Map Service owner:Schiphol_Administrator>]

In [27]:
layeritem


Out[27]:
[<Item title:"States" type:Feature Service owner:la_publisher>,
 <Item title:"Barriers_IWF" type:Feature Service owner:Ernst_NL>,
 <Item title:"IWF_BMP_Alles-FCL-Zoom_KLM" type:Map Document owner:beta_wagem007>,
 <Item title:"IWFOffline_VPR_KLM.gdb" type:File Geodatabase owner:beta_wagem007>,
 <Item title:"Passenger basemap - floor 0" type:Map Service owner:Schiphol_Administrator>,
 <Item title:"IWF_BMP_Barrier" type:Layer Package owner:beta_wagem007>,
 <Item title:"IWF_Basemap_1Flat" type:Vector Tile Service owner:Schiphol_Administrator>,
 <Item title:"Passenger basemap - floor 3" type:Map Service owner:Schiphol_Administrator>,
 <Item title:"IWF_Basemap_1" type:Vector Tile Service owner:Schiphol_Administrator>,
 <Item title:"IWF_POI_VLAKKEN" type:Feature Service owner:Schiphol_Administrator>]

In [31]:
scene = gis.content.search('pictometry', 'web scene')[0]
scene


Out[31]:
Pictometry 3D Scene
Pictometry 3D Scene with Indianapolis and Philadelphia 3D Scene LayersWeb Scene by whitepeterj
Last Modified: March 17, 2016
2 comments, 9,660 views

In [18]:
layeritem = portal.content.search('IWF','Map Service')[0]
layeritem


Out[18]:
Passenger basemap - floor 0
Indoor Wayfinding Basemap - Floor 0Map Service by Schiphol_Administrator
Last Modified: September 18, 2016
0 comments, 4 views

In [54]:
from IPython.display import display
layeritems = gis.content.search('IWF_POI_VLAKKEN ','Feature Service')
for item in layeritems:
    display(item)


IWF_POI_VLAKKEN
Indoor Wayfinding Feature Service by Schiphol_Administrator
Last Modified: September 22, 2016
0 comments, 7 views

In [32]:
map_2.center = gis.tools.geocoder.find_best_match("Schiphol", 6)
map_2

In [40]:
map_2.add_layer(POILayeritem)


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-40-64a568a9b246> in <module>()
----> 1 map_2.add_layer(POILayeritem)

C:\Users\Wagemakers\AppData\Local\Continuum\Anaconda3\lib\site-packages\arcgis\viz.py in add_layer(self, item, options)
    226                 self.addlayer = json.dumps(js_layer)
    227             else:
--> 228                 raise TypeError("item type must be feature service or image service")
    229 
    230 

TypeError: item type must be feature service or image service

In [7]:
map_2 = gis.map("Schiphol")
map_2


The installed widget Javascript is the wrong version.

In [ ]:


In [47]:
map_2


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
TypeError: _handle_map_msg() takes 3 positional arguments but 4 were given
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
TypeError: _handle_map_msg() takes 3 positional arguments but 4 were given
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
TypeError: _handle_map_msg() takes 3 positional arguments but 4 were given
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
TypeError: _handle_map_msg() takes 3 positional arguments but 4 were given
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
TypeError: _handle_map_msg() takes 3 positional arguments but 4 were given

In [66]:
map_2.center = gis.tools.geocoder.find_best_match("Schiphol", 6)
map_2.add_layer({"type":"FeatureLayer", 
               "url":"http://etest2.esri.nl:8080/arcgis/rest/services/Schiphol/IWF_POI/FeatureServer/0",
               "opacity":0.75})
map_2

In [1]:
from arcgis.gis import GIS
from arcgis.viz import *

gis = GIS()
stamenbasemaps = gis.content.search("tags:partner_basemap stamen", "web map", max_items=3)

wm = WebMap(stamenbasemaps[2])
wm


Out[1]:

In [2]:
from arcgis.gis import GIS
gis = GIS("https://deldev.maps.arcgis.com", "demo_deldev", "P@ssw0rd")
map = gis.map('Seattle, WA', 6)
map


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
TypeError: _handle_map_msg() takes 3 positional arguments but 4 were given
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
TypeError: _handle_map_msg() takes 3 positional arguments but 4 were given
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
TypeError: _handle_map_msg() takes 3 positional arguments but 4 were given

In [26]:
from arcgis.gis import GIS
map2 = arcgis.viz.MapView(id='0f1a0b1640d2433abe25120a54efe7f8')
map2

In [23]:


In [ ]: