[OpenLayers-Users] openstreetmap and sqlite

Tony Peña emperor.cu at gmail.com
Tue Nov 13 06:39:53 PST 2012


my question was too tiny in the final code sorry... i want to ask in this
code how can I pull the lat,lon from sqlite :-) ?
thanxs in advance


2012/11/13 Tony Peña <emperor.cu at gmail.com>

> this is an example restrict with positions setup
>
>
> var map;
> function init() {
>
>     // The overlay layer for our marker, with a simple diamond as symbol
>     var overlay = new OpenLayers.Layer.Vector('Overlay', {
>         styleMap: new OpenLayers.StyleMap({
>             externalGraphic: '../img/marker.png',
>             graphicWidth: 20, graphicHeight: 24, graphicYOffset: -24,
>             title: '${tooltip}'
>         })
>     });
>
>     // The location of our marker and popup. We usually think in geographic
>     // coordinates ('EPSG:4326'), but the map is projected ('EPSG:3857').
>     var myLocation = new OpenLayers.Geometry.Point(10.2, 48.9)
>         .transform('EPSG:4326', 'EPSG:3857');
>
>     // We add the marker with a tooltip text to the overlay
>     overlay.addFeatures([
>         new OpenLayers.Feature.Vector(myLocation, {tooltip: 'OpenLayers'})
>     ]);
>
>     // A popup with some information about our location
>     var popup = new OpenLayers.Popup.FramedCloud("Popup",
>         myLocation.getBounds().getCenterLonLat(), null,
>         '<a target="_blank" href="http://openlayers.org/">We</a> ' +
>         'could be here.<br>Or elsewhere.', null,
>         true // <-- true if we want a close (X) button, false otherwise
>     );
>
>     // Finally we create the map
>     map = new OpenLayers.Map({
>         div: "map", projection: "EPSG:3857",
>         layers: [new OpenLayers.Layer.OSM(), overlay],
>         center: myLocation.getBounds().getCenterLonLat(), zoom: 15
>     });
>     // and add the popup to it.
>     map.addPopup(popup);
> }
>
> how could be if that numbers come from sqlite database stored?? thanxs
>
>
> --
> Antonio Peña
> Secure email with PGP 0x8B021001 available at http://pgp.mit.edu
> Fingerprint: 74E6 2974 B090 366D CE71  7BB2 6476 FA09 8B02 1001
>



-- 
Antonio Peña
Secure email with PGP 0x8B021001 available at http://pgp.mit.edu
 Fingerprint: 74E6 2974 B090 366D CE71  7BB2 6476 FA09 8B02 1001
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20121113/028b6647/attachment.html>


More information about the Users mailing list