Re: [OpenMap Users] Can't open shape file

From: JayDub <justcallmejay_at_gmail.com>
Date: Wed, 9 Sep 2009 16:54:12 -0700 (PDT)

I think you need to also add the .ssx file.... for example
communities.shapeIndex=c:\\data\\communities_84.ssx

There's a class you can use to generate the ssx file.
com.bbn.openmap.layer.shape.ShapeIndex

Use it like so....
java -cp .;openmap.jar com.bbn.openmap.layer.shape.ShapeIndex shpfile.shp >
output.ssx

Then add the shapeIndex to your openmap.properties file.



indiga wrote:
>
> Another shape file is open but my shape file was convert from .tab
> file(mapinfo) with fwtolls.
> In my file i have street of my city.
> This is my code:
>
>
> import java.awt.event.*;
> import java.util.Properties;
> import javax.swing.JFrame;
>
> import com.bbn.openmap.*;
>
> import com.bbn.openmap.layer.shape.ShapeLayer;
>
>
> public class OpenMap extends JFrame {
>
> public OpenMap(String name)
> {
> super(name); // set title
>
>
> setSize(640, 480); // and location
>
> // Create a map handler (map, layer, component container)
> MapHandler mapHandler = new MapHandler();
>
> // Create a MapBean
> MapBean mapBean = new MapBean();
> mapHandler.add(mapBean);
>
> // mapBean.setScale(10000000f);
> // mapBean.setCenter(new LatLonPoint(35.0f, -800.0f));
>
>
> ShapeLayer shapeLayer = new ShapeLayer() ;
>
>
> Properties shapeLayerProps = new Properties();
> //Properties shapeLayerProps1 = new Properties();
>
> shapeLayerProps.put("prettyName", "Political Solid");
> shapeLayerProps.put("lineColor", "045000");
> shapeLayerProps.put("fillColor", "BD4E83");
>
>
> shapeLayerProps.put("shapeFile", "data/shape/city.shp");
>
>
> shapeLayer.setProperties(shapeLayerProps);
> mapBean.add(shapeLayer);
>
>
> getContentPane().add(mapBean);
>
> }
>
> public static void main(String[] argv) {
>
>
>
> OpenMap simpleMap = new OpenMap("Simple Map With Low-Level Mouse
> Events");
>
> simpleMap.addWindowListener(new WindowAdapter() {
> public void windowClosing(WindowEvent e) {
> System.exit(0);
> }});
>
> simpleMap.show();
> }
>
>
>
> }
> help please danke sir!!!!!!!!!
>

-- 
View this message in context: http://www.nabble.com/Can%27t-open-shape-file-tp25343410p25375087.html
Sent from the OpenMap mailing list archive at Nabble.com.
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Sep 09 2009 - 19:55:02 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT