Difference between revisions of "DeleteCity"

From CMSC 420
(Created page with "Removes a city with the specified name from data dictionary and the adjacency list. The criteria for success here is simply that the city exists. Note that if the city has bee...")
 
Line 8: Line 8:
 
<br>
 
<br>
 
<code>  
 
<code>  
<cityUnmapped name="city1" x="coordx" y="coordy" color="color1" radius="radius1"/>  
+
    <cityUnmapped name="city1" x="coordx" y="coordy" color="color1" radius="radius1"/>  
 
</code>
 
</code>
  

Revision as of 23:42, 10 September 2013

Removes a city with the specified name from data dictionary and the adjacency list. The criteria for success here is simply that the city exists. Note that if the city has been mapped, then it must be removed from the PR quadtree first, and then deleted.

Parameters[edit]

  • name

Possible <output>[edit]

If the city is in the spatial data structure, a cityUnmapped tag will appear as:

   <cityUnmapped name="city1" x="coordx" y="coordy" color="color1" radius="radius1"/> 

Possible <error> types (In priority order)[edit]

  • cityDoesNotExist

<success> Example[edit]

   <success>
       <command name="deleteCity"/>
       <parameters>
           <name value="Annapolis"/>
       </parameters>
       <output/>
   </success>