[OpenLayers-Users] problems with popups and selecting features

Alexandre Dube adube at mapgears.com
Fri Jan 8 14:56:54 EST 2010


Hi Ryan,

  It would be easier to use the OpenLayers.Layer.Vector object and 
manually define the Format you're working with (GML and KML in your 
case) and define SelectFeature controls to be able to click and see 
popups.  See this example [1].  It should contain anything you need to 
accomplish what you want to do.

  Hope this helps,

Alexandre

[1] http://openlayers.org/dev/examples/sundials-spherical-mercator.html


ryan burns wrote:
> Hello, OLers! This is my first OpenLayers map and I'm having serious 
> difficulty selecting features and seeing popups. I've literally spent 
> days trying to figure this out, so please forgive me if it's already 
> been discussed somewhere.
>
> Let me first give some background. I have three layers. One is a GML 
> layer from a text file of points (the text file is generated by a PHP 
> script reading from a MySQL spatially-enabled database). Another is a 
> marker layer (only one point), the location of which I have 
> hard-coded. The third is a KML generated in Google Earth.
>
> I've never been able to get popups in my map, or to select the point 
> features. Is there something terribly wrong with my code? In the OL 
> example (here 
> <http://openlayers.org/dev/examples/markersTextLayer.html>), there 
> doesn't seem to be anything special in the map that enabled popups. I 
> even followed the example code here 
> <http://docs.openlayers.org/library/overlays.html#transition-markers-to-vectors> 
> for selecting features.
>
> My site is here <http://128.95.212.135/mapyouth_php.php>, so that you 
> can see my code. Please forgive me if it's sloppy - I'm not much of a 
> programmer.
>
> Thank you much in advance!!! I sincerely appreciate any help you can 
> give me!
>
> ryan
>
> -- 
> Department of Geography
> University of Washington
>
> BurnsR77 at gmail.com <mailto:BurnsR77 at gmail.com>
> rlburns at uw.edu <mailto:rlburns at uw.edu>
> 859-582-9125
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>   


-- 
Alexandre Dubé
Mapgears
www.mapgears.com




More information about the Users mailing list