Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have created labels ,legends scale and North-direction pointer but I now need to conditionally hide or show the points using button in mapbasic program but I don't know the syntax.

Where can I find syntax examples to interact with map window?

I want to change current view in mapinfo window and plot map using values from same table but using certain condition.Any Example. My Code:

Open Table "geoLocation.TAB" Interactive
Map From geoLocation
select * from geoLocation where vendor = "V1" into selection

Now I want to redraw this selection in same map window but when i do :

Map From Selection

It draws in new window.How to avoid this and is my way correct way ?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

The MapBasic Referencce is a good start to find out all the different Functions existing in MapBasic, you find it here: http://www.pbinsight.com/support/product-documentation/details/mapinfo-mapbasic

Regarding your problem you should do: select * from geoLocation where vendor = "V1" into geolocation_selected (into selection is unneccesary because it is default) and then add geoLocation_selection to the map.

share|improve this answer
    
add statement creates new layer so if same statement is run it creates multiple layers. Is there any way to avoid this? –  kinkajou Jul 3 '11 at 22:46
    
Can you not remove the query layer from the map window before you rerun the query? Then you can add the query to the map window again once you have rerun the query. –  James S Jul 4 '11 at 7:51
    
Oh I could not get it query layer means code with query. Is there any example. Actually I jut want to show hide point not select it. –  kinkajou Jul 4 '11 at 9:13
1  
You can undisplay each object in the layer but it,s easier to create another layer. You can check if the layer is already part of the map. You get the name with LayerInfo(Window_id, layer_id,LAYER_INFO_NAME). Remove it and add the new layer from the query. –  Ulrik Nilsson Jul 5 '11 at 14:55
    
+1 @Ulrik Nilsson Thanks great stuff –  kinkajou Jul 7 '11 at 9:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.