thanks!

On Thu, Jan 20, 2011 at 9:21 AM, Mihai Visan <[email protected]> wrote:

>  Hi Nicholas,
>
> sorry for late answer, I was involved in another project. here is my code:
>
> <?php
> &i = 0;
> while ($eof) {
> $i += 1;
> $x =  round(($lon-$minLon)*$imageWidth/($maxLon-$minLon));
>
>  $y =  round(($lat-$minLat)*$imageHeight/($maxLat-$minLat));
> ?>
>
> var point_<?php echo $i ?> = new OpenLayers.Geometry.Point(<?php echo $x
> ?>, <?php echo $y ?>);
>   var point_2_Feature = new OpenLayers.Feature.Vector(point_2);
>
> <?php
> }
>
> var teleportsFeature = new OpenLayers.Feature.Vector(
>    new OpenLayers.Geometry.MultiPoint([<?php
>     for ($k=1; $k<=$i; $k++) {
>      echo "teleport_point_".$k.",";
>     }
>    ?>]),
>    {externalGraphic: 'img/marker.png', graphicHeight: 1, graphicWidth: 1});
>    teleports.addFeatures([<?php
>     for ($i=k; $k<=$i; $k++) {
>      echo "teleport_point_".$k."_Feature,";
>     }
>    ?>]);
> ?>
>
> ----- Original Message -----
> *From:* Nicholas Efremov-Kendall <[email protected]>
> *To:* Mihai Visan <[email protected]>
> *Cc:* OpenLayers User list <[email protected]>
> *Sent:* Thursday, December 09, 2010 5:54 PM
> *Subject:* Re: [OpenLayers-Users] create vector layer from Mysql
>
> Yes, please, that does sound interesting. I'd be interested in seeing your
> code.
>
> On Thu, Dec 9, 2010 at 8:03 AM, Mihai Visan <[email protected]> wrote:
>
>> I use a math formula to transform lat and lon (sensitive data) in pixels.
>> Formula is hiden in php result is shown in javascript. But this method is
>> valid only for Image layers I think.
>>
>> ----- Original Message ----- From: "Nick Kendall" <[email protected]>
>> To: "Mihai Visan" <[email protected]>
>> Cc: "OpenLayers User list" <[email protected]>
>> Sent: Thursday, December 09, 2010 4:00 PM
>>
>> Subject: Re: [OpenLayers-Users] create vector layer from Mysql
>>
>>
>> How did you solve this?
>>>
>>> Sent from my mobile device
>>>
>>> On Dec 9, 2010, at 1:58 AM, "Mihai Visan" <[email protected]> wrote:
>>>
>>> Thanks for advices, I think I can solved the problem.
>>>>
>>>> Mihai
>>>>
>>>> ----- Original Message ----- From: "Michael" <[email protected]>
>>>> To: <[email protected]>
>>>> Sent: Tuesday, December 07, 2010 7:06 PM
>>>> Subject: Re: [OpenLayers-Users] create vector layer from Mysql
>>>>
>>>>
>>>> Simpler, and what I do, is just run a PHP script to query the database
>>>>> and
>>>>> write a file that contains the data.  I do this only when the database
>>>>> is
>>>>> updated.
>>>>> Javascript that directly queries mySQL is said to be a BAD thing....
>>>>>
>>>>> m
>>>>>
>>>>> On 12/7/2010 8:48 AM, David Fawcett wrote:
>>>>>
>>>>>> For Case 1:  I believe that if you want to create a vector layer (on
>>>>>> the client side), you will have to send data in a format that someone
>>>>>> else will be able to read.  In other words, if OpenLayers can
>>>>>> read/decode it, someone else will be able to do so also.
>>>>>>
>>>>>> If you really want to only expose a picture of your data and not the
>>>>>> data itself, I recommend looking into creating your own WMS service
>>>>>> using OpenLayers to display the image of the data as returned by your
>>>>>> WMS.
>>>>>>
>>>>>> David.
>>>>>>
>>>>>> On Tue, Dec 7, 2010 at 10:06 AM, Mihai Visan<[email protected]>
>>>>>>  wrote:
>>>>>>
>>>>>>> Hi everybody,
>>>>>>>
>>>>>>> This probably have been talk already but I wasn't a menber then.
>>>>>>>
>>>>>>> I have 2 simple question:
>>>>>>>
>>>>>>> Case 1:
>>>>>>> Let's say I have a MySql table with some data that I don't want to
>>>>>>> expose to
>>>>>>> public. I know that I can read data from an xml, but xml files can be
>>>>>>> "read"
>>>>>>> by others and I don't want this. Is there a way I can create an
>>>>>>> Vector
>>>>>>> layer
>>>>>>> vith multiple data directly from an MySql querry?
>>>>>>>
>>>>>>> Case 2:
>>>>>>> I request dota shown in map (vectorl layers active or note with
>>>>>>> different
>>>>>>> data) from an form. What is the best way to comunicate betwen form
>>>>>>> and
>>>>>>> OpenLayers Map?
>>>>>>>
>>>>>>> Thanks for help,
>>>>>>>
>>>>>>> By the way I stiil wait some help with my previos post: "custom Lat
>>>>>>> and
>>>>>>> Lon
>>>>>>> display in wrap data line help needed"
>>>>>>> Mihai
>>>>>>> _______________________________________________
>>>>>>> Users mailing list
>>>>>>> [email protected]
>>>>>>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>> Users mailing list
>>>>>> [email protected]
>>>>>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>>>>>
>>>>>
>>>>>
>>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> [email protected]
>>>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>>>
>>>
>> _______________________________________________
>> Users mailing list
>> [email protected]
>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>
>
>
>
> --
> Nicholas Efremov-Kendall
>
> Ph.D Candidate
> Dept. of Anthropology
> Washington University in St. Louis
> Campus Box 1114
> St. Louis, MO, 63130
> (917) 370-3489
> [email protected] <[email protected]>
>
>


-- 
Nicholas Efremov-Kendall

Ph.D Candidate
Dept. of Anthropology
Washington University in St. Louis
Campus Box 1114
St. Louis, MO, 63130
(917) 370-3489
[email protected] <[email protected]>
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to