fromContainerPixelToLatLng and fromDivPixelToLatLng in WML 0.3

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

fromContainerPixelToLatLng and fromDivPixelToLatLng in WML 0.3

Jordan Anderson
Hi all,

ridethecity.com is currently using v0.2 of the Web Maps Lite API, but
I've been experimenting with using 0.3. Everything works okay except I
sometimes get unexpected results from map.fromContainerPixelToLatLng
and map.fromDivPixelToLatLng. I'm having a hard time figuring out the
conditions under which those two functions misbehave, but it is
usually (but not always) after I've panned the map. The result is that
my click or drag event gives me the incorrect LatLng.

I've mainly been testing this in Firefox 3.5.

Thanks,
Jordan
_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: fromContainerPixelToLatLng and fromDivPixelToLatLng in WML 0.3

Vladimir Agafonkin
Hi Jordan,

We haven't seen any issues with it yet. It is easily tested with the following code, perhaps you could set up a test page and find at least one condition under which misbehavior occurs:

CM.Event.addListener(map, 'click', function(latlng) {
     map.addOverlay(new CM.Marker(latlng));
});

Thanks!

On Tue, Sep 29, 2009 at 4:57 PM, Jordan Anderson <[hidden email]> wrote:
Hi all,

ridethecity.com is currently using v0.2 of the Web Maps Lite API, but
I've been experimenting with using 0.3. Everything works okay except I
sometimes get unexpected results from map.fromContainerPixelToLatLng
and map.fromDivPixelToLatLng. I'm having a hard time figuring out the
conditions under which those two functions misbehave, but it is
usually (but not always) after I've panned the map. The result is that
my click or drag event gives me the incorrect LatLng.

I've mainly been testing this in Firefox 3.5.

Thanks,
Jordan
_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev



--
Vladimir Agafonkin
Front-End Architect, CloudMade
+380 93 745 44 61

_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: fromContainerPixelToLatLng and fromDivPixelToLatLng in WML 0.3

Jordan Anderson
Hi Vladimir,

I can't seem to reproduce it, except on my own page.

Try this:
1. Go to http://drupal.ridethecity.com
2. Drag the green bicyclist or red stop sign to the map. You should
see them dropped some pixels offset from where you actually dropped
them.
3. Now zoom in or out.
4. Drag the green bicyclist or red stop sign to the map again. Now
they should be placed in the correct position. It seems that the zoom
in/out is setting something that isn't getting set otherwise. Perhaps
I'm setting up some of the WML objects in the wrong order?

Any insight you can provide is very much appreciated.

Thanks,
Jordan

On Tue, Sep 29, 2009 at 9:32 AM, Vladimir Agafonkin
<[hidden email]> wrote:

> Hi Jordan,
>
> We haven't seen any issues with it yet. It is easily tested with the
> following code, perhaps you could set up a test page and find at least one
> condition under which misbehavior occurs:
>
> CM.Event.addListener(map, 'click', function(latlng) {
>      map.addOverlay(new CM.Marker(latlng));
> });
>
> Thanks!
>
> On Tue, Sep 29, 2009 at 4:57 PM, Jordan Anderson <[hidden email]>
> wrote:
>>
>> Hi all,
>>
>> ridethecity.com is currently using v0.2 of the Web Maps Lite API, but
>> I've been experimenting with using 0.3. Everything works okay except I
>> sometimes get unexpected results from map.fromContainerPixelToLatLng
>> and map.fromDivPixelToLatLng. I'm having a hard time figuring out the
>> conditions under which those two functions misbehave, but it is
>> usually (but not always) after I've panned the map. The result is that
>> my click or drag event gives me the incorrect LatLng.
>>
>> I've mainly been testing this in Firefox 3.5.
>>
>> Thanks,
>> Jordan
>> _______________________________________________
>> Dev site list
>> [hidden email]
>> http://lists.cloudmade.com/listinfo/dev
>
>
>
> --
> Vladimir Agafonkin
> Front-End Architect, CloudMade
> +380 93 745 44 61
>
_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: fromContainerPixelToLatLng and fromDivPixelToLatLng in WML 0.3

Jordan Anderson
Hi all,

I changed the URL slightly so we can continue with other testing on
the site. If you use http://drupal.ridethecity.com then it will use
Web Maps Lite 2.0 and marker placement works as expected. If you use
http://drupal.ridethecity.com?3 then it will use Web Maps Lite 3.0 and
you can reproduce the marker placement problem described below.

Thanks,
Jordan

On Sun, Nov 15, 2009 at 9:23 PM, Jordan Anderson <[hidden email]> wrote:

> Hi Vladimir,
>
> I can't seem to reproduce it, except on my own page.
>
> Try this:
> 1. Go to http://drupal.ridethecity.com
> 2. Drag the green bicyclist or red stop sign to the map. You should
> see them dropped some pixels offset from where you actually dropped
> them.
> 3. Now zoom in or out.
> 4. Drag the green bicyclist or red stop sign to the map again. Now
> they should be placed in the correct position. It seems that the zoom
> in/out is setting something that isn't getting set otherwise. Perhaps
> I'm setting up some of the WML objects in the wrong order?
>
> Any insight you can provide is very much appreciated.
>
> Thanks,
> Jordan
>
> On Tue, Sep 29, 2009 at 9:32 AM, Vladimir Agafonkin
> <[hidden email]> wrote:
>> Hi Jordan,
>>
>> We haven't seen any issues with it yet. It is easily tested with the
>> following code, perhaps you could set up a test page and find at least one
>> condition under which misbehavior occurs:
>>
>> CM.Event.addListener(map, 'click', function(latlng) {
>>      map.addOverlay(new CM.Marker(latlng));
>> });
>>
>> Thanks!
>>
>> On Tue, Sep 29, 2009 at 4:57 PM, Jordan Anderson <[hidden email]>
>> wrote:
>>>
>>> Hi all,
>>>
>>> ridethecity.com is currently using v0.2 of the Web Maps Lite API, but
>>> I've been experimenting with using 0.3. Everything works okay except I
>>> sometimes get unexpected results from map.fromContainerPixelToLatLng
>>> and map.fromDivPixelToLatLng. I'm having a hard time figuring out the
>>> conditions under which those two functions misbehave, but it is
>>> usually (but not always) after I've panned the map. The result is that
>>> my click or drag event gives me the incorrect LatLng.
>>>
>>> I've mainly been testing this in Firefox 3.5.
>>>
>>> Thanks,
>>> Jordan
>>> _______________________________________________
>>> Dev site list
>>> [hidden email]
>>> http://lists.cloudmade.com/listinfo/dev
>>
>>
>>
>> --
>> Vladimir Agafonkin
>> Front-End Architect, CloudMade
>> +380 93 745 44 61
>>
>
_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: fromContainerPixelToLatLng and fromDivPixelToLatLng in WML 0.3

Shaun McDonald-2
Web Maps Lite 0.4 is out, so you might want to try that and see if that works better than 0.3.

Shaun

On 16 Nov 2009, at 22:42, Jordan Anderson wrote:

> Hi all,
>
> I changed the URL slightly so we can continue with other testing on
> the site. If you use http://drupal.ridethecity.com then it will use
> Web Maps Lite 2.0 and marker placement works as expected. If you use
> http://drupal.ridethecity.com?3 then it will use Web Maps Lite 3.0 and
> you can reproduce the marker placement problem described below.
>
> Thanks,
> Jordan
>
> On Sun, Nov 15, 2009 at 9:23 PM, Jordan Anderson <[hidden email]> wrote:
>> Hi Vladimir,
>>
>> I can't seem to reproduce it, except on my own page.
>>
>> Try this:
>> 1. Go to http://drupal.ridethecity.com
>> 2. Drag the green bicyclist or red stop sign to the map. You should
>> see them dropped some pixels offset from where you actually dropped
>> them.
>> 3. Now zoom in or out.
>> 4. Drag the green bicyclist or red stop sign to the map again. Now
>> they should be placed in the correct position. It seems that the zoom
>> in/out is setting something that isn't getting set otherwise. Perhaps
>> I'm setting up some of the WML objects in the wrong order?
>>
>> Any insight you can provide is very much appreciated.
>>
>> Thanks,
>> Jordan
>>
>> On Tue, Sep 29, 2009 at 9:32 AM, Vladimir Agafonkin
>> <[hidden email]> wrote:
>>> Hi Jordan,
>>>
>>> We haven't seen any issues with it yet. It is easily tested with the
>>> following code, perhaps you could set up a test page and find at least one
>>> condition under which misbehavior occurs:
>>>
>>> CM.Event.addListener(map, 'click', function(latlng) {
>>>      map.addOverlay(new CM.Marker(latlng));
>>> });
>>>
>>> Thanks!
>>>
>>> On Tue, Sep 29, 2009 at 4:57 PM, Jordan Anderson <[hidden email]>
>>> wrote:
>>>>
>>>> Hi all,
>>>>
>>>> ridethecity.com is currently using v0.2 of the Web Maps Lite API, but
>>>> I've been experimenting with using 0.3. Everything works okay except I
>>>> sometimes get unexpected results from map.fromContainerPixelToLatLng
>>>> and map.fromDivPixelToLatLng. I'm having a hard time figuring out the
>>>> conditions under which those two functions misbehave, but it is
>>>> usually (but not always) after I've panned the map. The result is that
>>>> my click or drag event gives me the incorrect LatLng.
>>>>
>>>> I've mainly been testing this in Firefox 3.5.
>>>>
>>>> Thanks,
>>>> Jordan
>>>> _______________________________________________
>>>> Dev site list
>>>> [hidden email]
>>>> http://lists.cloudmade.com/listinfo/dev
>>>
>>>
>>>
>>> --
>>> Vladimir Agafonkin
>>> Front-End Architect, CloudMade
>>> +380 93 745 44 61
>>>
>>
> _______________________________________________
> Dev site list
> [hidden email]
> http://lists.cloudmade.com/listinfo/dev

_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: fromContainerPixelToLatLng and fromDivPixelToLatLng in WML 0.3

Jordan Anderson
Thanks, Shaun. You're right -- 0.4 fixes this problem.

Thanks,
Jordan

On Mon, Nov 16, 2009 at 8:31 PM, Shaun McDonald <[hidden email]> wrote:

> Web Maps Lite 0.4 is out, so you might want to try that and see if that works better than 0.3.
>
> Shaun
>
> On 16 Nov 2009, at 22:42, Jordan Anderson wrote:
>
>> Hi all,
>>
>> I changed the URL slightly so we can continue with other testing on
>> the site. If you use http://drupal.ridethecity.com then it will use
>> Web Maps Lite 2.0 and marker placement works as expected. If you use
>> http://drupal.ridethecity.com?3 then it will use Web Maps Lite 3.0 and
>> you can reproduce the marker placement problem described below.
>>
>> Thanks,
>> Jordan
>>
>> On Sun, Nov 15, 2009 at 9:23 PM, Jordan Anderson <[hidden email]> wrote:
>>> Hi Vladimir,
>>>
>>> I can't seem to reproduce it, except on my own page.
>>>
>>> Try this:
>>> 1. Go to http://drupal.ridethecity.com
>>> 2. Drag the green bicyclist or red stop sign to the map. You should
>>> see them dropped some pixels offset from where you actually dropped
>>> them.
>>> 3. Now zoom in or out.
>>> 4. Drag the green bicyclist or red stop sign to the map again. Now
>>> they should be placed in the correct position. It seems that the zoom
>>> in/out is setting something that isn't getting set otherwise. Perhaps
>>> I'm setting up some of the WML objects in the wrong order?
>>>
>>> Any insight you can provide is very much appreciated.
>>>
>>> Thanks,
>>> Jordan
>>>
>>> On Tue, Sep 29, 2009 at 9:32 AM, Vladimir Agafonkin
>>> <[hidden email]> wrote:
>>>> Hi Jordan,
>>>>
>>>> We haven't seen any issues with it yet. It is easily tested with the
>>>> following code, perhaps you could set up a test page and find at least one
>>>> condition under which misbehavior occurs:
>>>>
>>>> CM.Event.addListener(map, 'click', function(latlng) {
>>>>      map.addOverlay(new CM.Marker(latlng));
>>>> });
>>>>
>>>> Thanks!
>>>>
>>>> On Tue, Sep 29, 2009 at 4:57 PM, Jordan Anderson <[hidden email]>
>>>> wrote:
>>>>>
>>>>> Hi all,
>>>>>
>>>>> ridethecity.com is currently using v0.2 of the Web Maps Lite API, but
>>>>> I've been experimenting with using 0.3. Everything works okay except I
>>>>> sometimes get unexpected results from map.fromContainerPixelToLatLng
>>>>> and map.fromDivPixelToLatLng. I'm having a hard time figuring out the
>>>>> conditions under which those two functions misbehave, but it is
>>>>> usually (but not always) after I've panned the map. The result is that
>>>>> my click or drag event gives me the incorrect LatLng.
>>>>>
>>>>> I've mainly been testing this in Firefox 3.5.
>>>>>
>>>>> Thanks,
>>>>> Jordan
>>>>> _______________________________________________
>>>>> Dev site list
>>>>> [hidden email]
>>>>> http://lists.cloudmade.com/listinfo/dev
>>>>
>>>>
>>>>
>>>> --
>>>> Vladimir Agafonkin
>>>> Front-End Architect, CloudMade
>>>> +380 93 745 44 61
>>>>
>>>
>> _______________________________________________
>> Dev site list
>> [hidden email]
>> http://lists.cloudmade.com/listinfo/dev
>
>
_______________________________________________
Dev site list
[hidden email]
http://lists.cloudmade.com/listinfo/dev