Changeset 8909 in osm
- Timestamp:
- 2008-07-10T13:21:02+02:00 (16 years ago)
- Location:
- applications/editors/josm/plugins/namefinder
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/namefinder/build.xml
r7287 r8909 39 39 <!-- dist target - create jar file --> 40 40 <target name="dist" depends="compile"> 41 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 42 <env key="LANG" value="C"/> 43 <arg value="info"/> 44 <arg value="--xml"/> 45 <arg value="."/> 46 </exec> 47 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/> 48 <delete file="REVISION"/> 41 49 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 42 50 <manifest> 43 51 <attribute name="Plugin-Class" value="namefinder.NameFinderPlugin" /> 44 52 <attribute name="Plugin-Description" value="Allows selection of download areas by name, using an external service" /> 45 <attribute name="Plugin-Version" value="1.0" /> 53 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 54 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 46 55 </manifest> 47 56 </jar> -
applications/editors/josm/plugins/namefinder/namefinder/PlaceSelection.java
r7477 r8909 165 165 component.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); 166 166 component.repaint(); 167 URL url = new URL("http://gazetteer.openstreetmap.org/namefinder/?find="+java.net.URLEncoder.encode(searchTerm.getText(), "UTF-8")); 167 URL url = new URL("http://gazetteer.openstreetmap.org/namefinder/search.xml?find=" 168 +java.net.URLEncoder.encode(searchTerm.getText(), "UTF-8")); 168 169 HttpURLConnection activeConnection = (HttpURLConnection)url.openConnection(); 169 System.out.println("got return: "+activeConnection.getResponseCode());170 //System.out.println("got return: "+activeConnection.getResponseCode()); 170 171 activeConnection.setConnectTimeout(15000); 171 172 InputStream inputStream = activeConnection.getInputStream(); 172 173 InputSource inputSource = new InputSource(new InputStreamReader(inputStream, "UTF-8")); 173 174 SAXParserFactory.newInstance().newSAXParser().parse(inputSource, new Parser()); 174 175 } 175 176 catch (Exception x) … … 224 225 }); 225 226 226 searchResults.addColumn( "name");227 searchResults.addColumn( "type");228 searchResults.addColumn( "near");229 searchResults.addColumn( "zoom");227 searchResults.addColumn(tr("name")); 228 searchResults.addColumn(tr("type")); 229 searchResults.addColumn(tr("near")); 230 searchResults.addColumn(tr("zoom")); 230 231 231 232 // TODO - this is probably not the coolest way to set relative sizes? 232 searchResultDisplay.getColumn( "name").setPreferredWidth(200);233 searchResultDisplay.getColumn( "type").setPreferredWidth(100);234 searchResultDisplay.getColumn( "near").setPreferredWidth(100);235 searchResultDisplay.getColumn( "zoom").setPreferredWidth(50);233 searchResultDisplay.getColumn(tr("name")).setPreferredWidth(200); 234 searchResultDisplay.getColumn(tr("type")).setPreferredWidth(100); 235 searchResultDisplay.getColumn(tr("near")).setPreferredWidth(100); 236 searchResultDisplay.getColumn(tr("zoom")).setPreferredWidth(50); 236 237 searchResultDisplay.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 237 238
Note:
See TracChangeset
for help on using the changeset viewer.