Re: [OpenMap Users] Add layer (shape file)

From: Don Dietrick <dietrick@bbn.com>
Date: Fri Feb 07 2003 - 14:58:32 EST

On Thursday, February 6, 2003, at 06:39 PM, CHAKIRI HOUDA wrote:

> Hi
> i am trying indeed to change the scale but i didn't manage to do it can
> you help me .. i am getting the same small point that i got before..in
> addition to a message error:
> *** ERROR ***
>
> SpatialIndex.locateRecords: IOException.
>
> *************
>
> java.io.IOException: Invalid polygon record. Expected shape type 5 or
> type 3, but found 0

I'm not sure what's up with this. You might want to run
com.bbn.openmap.layer.shape.SpatialIndex -d -b <xxxxxxxx.ssx> to see
what the bounding boxes are for your shape file. The bounding boxes
should look like they are defined in decimal degrees.

> LatLonPoint llp = new LatLonPoint(35.12345, -5.98762);
> mapBean1.setScale(mapBean1.getScale()*1000000000);

This doesn't zoom in, it zooms out. Smaller values = larger scales
((1:value) = scale), smaller values = zooming in.

- Don

>
>
> On Wed, 5 Feb 2003, Don Dietrick wrote:
>
>> Hi Chakiri,
>>
>> You need to change the projection on the MapBean so the scale number
>> is
>> smaller (increasing the scale of the map), and the lat/lon values are
>> over the area of your road file - this effectively zooms in on your
>> data.
>>
>> - Don
>>
>> On Wednesday, February 5, 2003, at 05:39 PM, CHAKIRI HOUDA wrote:
>>
>>> Hi
>>> i am trying to add a layer to my map, i tried the simple map exemple
>>> and
>>> it works fine it dispalays the world map. when i wanted to add a
>>> layer
>>> (roads of a city) it just appears as a very small point within the
>>> map..
>>> can you help me so that it covers the whole area of the map.. i
>>> joined
>>> my
>>> code to this message..
>>> thanks a lot
>>> houda
>>>
>>> MapBean mapBean1 = new MapBean();
>>> ShapeLayer layer = new ShapeLayer();
>>>
>>> .................
>>> Properties layerprops = new Properties();
>>> layerprops.put("pretyname","political solid");
>>> layerprops.put("lineColor","000000");
>>> layerprops.put("fillColor","BDDE83");
>>> layerprops.put("shapeFile","New
>>> Folder/Project_lastversio/roads.shp");
>>> layerprops.put("spatialIndex","New
>>> Folder/Project_lastversio/roads.ssx");
>>> layer.setProperties(layerprops);
>>> ...............
>>> mapBean1.add(layer);
>>>
>>> --
>>> [To unsubscribe to this list send an email to "majdart@bbn.com"
>>> with the following text in the BODY of the message "unsubscribe
>>> openmap-users"]
>>>
>>>
>>
>>
>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> Don Dietrick, BBN Technologies, dietrick@bbn.com
>> 10 Moulton Street, Cambridge, MA 02138
>> 617-873-3031 [fax]-2794
>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>
>> --
>> [To unsubscribe to this list send an email to "majdart@bbn.com"
>> with the following text in the BODY of the message "unsubscribe
>> openmap-users"]
>>
>
>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, BBN Technologies, dietrick@bbn.com
10 Moulton Street, Cambridge, MA 02138
617-873-3031 [fax]-2794
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri Feb 7 14:58:42 2003

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:34 EDT