amMap support forum

You are not logged in.

Announcement

FORUM CLOSED! This forum is closed. We moved to a new place at Zendesk. Update your bookmarks.

Flash amMap: Bug report


#1 2009-05-07 12:40:50

cmullican
Member

2.5.0 lat-long/alignment bug

I'm placing movies via lat-long, on a USA (Mercator) map.  Using amMap 2.3.1, everything is in the right place.  I tried switching to 2.5.0 this morning, due to the text box close button fix, and the movies are not aligning properly to the map anymore.  I checked my corner lat-long settings vs. those in the included example, and they match.

Here's an example of the misalignment: http://rms.trusonic.com/images/mapp_bug.jpg

Also, if I set color_hover for a movie without explicitly setting color in the data file (using the settings file default), it remains the hover color when not hovered, as you can see in the same image.  If I set both in the data file, it does return to the default color immediately when not being hovered, but what I really want is for the currently-selected movie -- the one whose details are showing in the text-box -- to be highlighted, regardless of whether it's currently hovered or not.

Offline

 

#2 2009-05-08 01:31:16

qemm
Administrator

Re: 2.5.0 lat-long/alignment bug

I've compared /examples/_countries/usa_mercator/ examples from the three versions - 2.3.1, 2.4.1 and 2.5.0 - cities are positioned identically.

Please check if you have set mercator projection in your settings file.

Offline

 

#3 2009-05-08 11:57:52

cmullican
Member

Re: 2.5.0 lat-long/alignment bug

Yes, the settings and data files are identical between 2.3.1, where it works, and 2.5.0, where it doesn't.  The only thing I changed was the ammap.swf file.

Offline

 

#4 2009-05-08 19:11:34

irfan
Member

Re: 2.5.0 lat-long/alignment bug

I have the same problem with version 2.5.0. When i try to display cities in the state of Arizona using the USA map they show up in California, however when i display the same cities using the world map they are displayed correctly. Here is  my data file,

<?xml version="1.0" encoding="UTF-8"?>
<map map_file="maps/usa.swf" zoom="490%" zoom_x="-60.63%" zoom_y="-192.46%">
  <areas>
       <area mc_name="AZ" title="Arizona"></area>
  </areas>
  <movies>
      <movie file="home" x="50" y="71" url="!ammap_data_usa.xml"></movie>
      <movie file="target" title="Phoenix" lat="33.4486" long="-112.0733" width="10" height="10" fixed_size="true"  value="123" description="requests"></movie>
      <movie file="target" title="Mesa" lat="33.434" long="-111.8483" width="10" height="10" fixed_size="true"  value="10" description="requests"></movie>
      <movie file="target" title="Tempe" lat="33.4148" long="-111.9088" width="10" height="10" fixed_size="true"  value="12" description="requests"></movie>
      <movie file="target" title="Gilbert" lat="33.3504" long="-111.8085" width="10" height="10" fixed_size="true"  value="13" description="requests"></movie>
      <movie file="target" title="Flagstaff" lat="35.4784" long="-111.738" width="10" height="10" fixed_size="true"  value="123" description="requests"></movie>
      <movie file="target" title="Tucson" lat="32.2167" long="-110.9709" width="10" height="10" fixed_size="true"  value="123" description="requests"></movie>
      <movie file="target" title="Sedona" lat="34.6859" long="-111.2845" width="10" height="10" fixed_size="true" value="123" description="requests"></movie>
      <movie file="target" title="Lake Havasu City" lat="34.6022" long="-113.772" width="10" height="10" fixed_size="true"  value="123" description="requests"></movie>
  </movies>     
  <labels>
    <label x="49.8193%" y="5.0392%" text_size="18" color="#FFFFFF" remain="false">
      <text>ARIZONA</text>
    </label>
    <label x="60" y="60" url="!ammap_data_usa.xml" remain="true" color_hover="#CC0000" zoom_x="0%" zoom_y="0" zoom="100%">
        <text><![CDATA[<b>Back to USA map</b>]]></text>
      </label>
  </labels>
</map>

Offline

 

#5 2009-05-11 04:46:06

qemm
Administrator

Re: 2.5.0 lat-long/alignment bug

I've pasted your data into samples on 2.3.1 version and they still show up in California. So this is not version issue.

I see that you are using long/lat coordinates on a non-mercator map of the USA. Lon/lat coordinates on a non-mercator map are just the approximate pseudo-coordinates. The reason that they are displayed correctly on World map is that World map is by default mercator. Try using your data on a examples/usa_mercator sample and you'll see that AZ cities show correctly.

Offline

 

#6 2009-05-11 11:41:58

cmullican
Member

Re: 2.5.0 lat-long/alignment bug

Further info on my case: 

The map IS set to mercator.  The only thing I am changing is which version of ammap.swf is in place.  In developer mode, 2.3.1 shows correct lat / long values for my movies, 2.5.0 does not.  The data is dynamically generated, and the function called has not changed.  The x / y values also do not match between the two; it is the data points that are shifted, not the map.

Offline

 

#7 2009-05-11 11:58:38

irfan
Member

Re: 2.5.0 lat-long/alignment bug

More information, even when I use the mercartor map, the cities do not show up in arizona, in fact they are now displayed right by alaska. Here is my data file.

<?xml version="1.0" encoding="UTF-8"?>
<map map_file="maps/usa_mercator.swf" zoom="490%" zoom_x="-60.63%" zoom_y="-192.46%">
  <areas>
       <area mc_name="AZ" title="Arizona"></area>
  </areas>
  <movies>
      <movie file="home" x="50" y="71" url="!ammap_data_usa.xml"></movie>
      <movie file="target" title="Phoenix" lat="33.4486" long="-112.0733" width="10" height="10" fixed_size="true"  value="123" description="requests"></movie>
      <movie file="target" title="Mesa" lat="33.434" long="-111.8483" width="10" height="10" fixed_size="true"  value="10" description="requests"></movie>
      <movie file="target" title="Tempe" lat="33.4148" long="-111.9088" width="10" height="10" fixed_size="true"  value="12" description="requests"></movie>
      <movie file="target" title="Gilbert" lat="33.3504" long="-111.8085" width="10" height="10" fixed_size="true"  value="13" description="requests"></movie>
      <movie file="target" title="Flagstaff" lat="35.4784" long="-111.738" width="10" height="10" fixed_size="true"  value="123" description="requests"></movie>
      <movie file="target" title="Tucson" lat="32.2167" long="-110.9709" width="10" height="10" fixed_size="true"  value="123" description="requests"></movie>
      <movie file="target" title="Sedona" lat="34.6859" long="-111.2845" width="10" height="10" fixed_size="true" value="123" description="requests"></movie>
      <movie file="target" title="Lake Havasu City" lat="34.6022" long="-113.772" width="10" height="10" fixed_size="true"  value="123" description="requests"></movie>
  </movies>     
  <labels>
    <label x="49.8193%" y="5.0392%" text_size="18" color="#FFFFFF" remain="false">
      <text>ARIZONA</text>
    </label>
    <label x="60" y="60" url="!ammap_data_usa.xml" remain="true" color_hover="#CC0000" zoom_x="0%" zoom_y="0" zoom="100%">
        <text><![CDATA[<b>Back to USA map</b>]]></text>
      </label>
  </labels>
</map>

Offline

 

#8 2009-05-11 12:01:29

cmullican
Member

Re: 2.5.0 lat-long/alignment bug

Irfan -- you need to set the bounding corners (top right and bottom left)  lat and long in the <map> tag.  See the included example fore specific values.

Offline

 

#9 2009-05-11 13:03:57

irfan
Member

Re: 2.5.0 lat-long/alignment bug

I've set the bounding corners as well
  <map map_file="maps/usa_mercator.swf" zoom="1184%" zoom_x="-621.63%" zoom_y="-893.46%" tl_long="27.5528" tl_lat="-82.995" br_long="43.70" br_lat="-87.084">

I got the bounding values from the map by turning on the developer mode. I am trying to display the map of the state of Arizona in USA. As you can see the latitude values that I got from the map are negative values which is incorrect. While the map does display correctly showing the state of Arizona, the cities are not displayed when specified using the lat and long values.

Am i missing something else.

Thanks
Irfan

Offline

 

#10 2009-05-11 13:06:36

cmullican
Member

Re: 2.5.0 lat-long/alignment bug

Yes, you need to set the bounding corners _correctly_, as in the example:  tl_long="-178.244751", tl_lat="71.455555", br_long="-66.936676", br_lat="18.96519"

Offline

 

#11 2009-05-11 13:54:12

irfan
Member

Re: 2.5.0 lat-long/alignment bug

Sorry if I'm not understanding this correctly. When I used the bounding corners you provided it just displayed a black area. Then bounding areas I specified (and sent earlier) display the map of Arizona correctly but not the cities. I have been working off the drill down example. Is that the same example you are talking about. If you point me to the right example then I can play with it on my own.

Thanks

Offline

 

#12 2009-05-11 14:41:33

cmullican
Member

Re: 2.5.0 lat-long/alignment bug

No, use the usa_mercator example.

Offline

 

#13 2009-05-11 15:23:06

irfan
Member

Re: 2.5.0 lat-long/alignment bug

I got it to work with the usa_mercator example, but it still doesn't work for the case I'm trying to make it work for. Here is what I am trying
Display the world map, the user clicks on the continent of North America, which displays just the NA map. The user then clicks US on the map which displays just the map of US. Since I do not have individual state maps within US, what I am attempting to do is that when the user clicks on a particular state within US, i zoom in to the US map and just display that state ( and of course any surrounding states that are visible) by specifying the appropriate zoom values for that state that I obtain from the developer made.

Given this, the cities within Arizona are displayed correctly in the context of the US map but when i display the map of US with the zoom settings set to zoom into Arizona, the cities are off their expected locations. So my question is what I am trying to do just not possible with the am maps.

This is the setting to display the US map zoomed into Arizona
<map map_file="maps/usa_mercator.swf" tl_long="-114.244751" tl_lat="36.455555" br_long="-109.936676" br_lat="31.96519"  zoom="1063%" zoom_x="-566.97%" zoom_y="-800.59%">

Offline

 

#14 2009-05-11 15:31:16

cmullican
Member

Re: 2.5.0 lat-long/alignment bug

At this point, you've gone beyond my experience with the product.  I don't know if it's the same bug I'm seeing, or if it's something in the settings.   There are some drill-down related threads over in Help that might be useful if it's the latter.

Last edited by cmullican (2009-05-11 15:31:38)

Offline

 

#15 2009-05-12 09:08:24

trichins
Moderator

Re: 2.5.0 lat-long/alignment bug

irfan & cmullican,

If you can provide links to your amMap installations so we can take a look at a few things, we can better troubleshoot your issues.

Offline

 

#16 2009-05-12 11:40:01

cmullican
Member

Re: 2.5.0 lat-long/alignment bug

trichins: My application is not publicly accessible; it's currently in development, and will subsequently be available to our customers only.  However, I'd be happy to check out anything you ask.

Offline

 

#17 2009-05-12 12:00:07

irfan
Member

Re: 2.5.0 lat-long/alignment bug

Trichins, same with mine. I actually haven't developed anything. All I did was take the drill down example and modify some of the data files. I'd be more than happy to zip those files up and mail it to you. Let me know if you want me to do that.

Offline

 

#18 2009-05-12 15:06:07

irfan
Member

Re: 2.5.0 lat-long/alignment bug

Here are the contents of the data file i have. I am trying to display the state of Arizona zoom-ed in and display some cities within the state.

<?xml version="1.0" encoding="UTF-8"?>
<map map_file="maps/usa_mercator.swf" tl_long="-114.244751" tl_lat="36.455555" br_long="-109.936676" br_lat="31.96519"  zoom="1063%" zoom_x="-566.97%" zoom_y="-800.59%">
<areas>
       <area mc_name="US_AZ" title="Arizona"></area>
  </areas>
  <movies>
      <movie file="home" x="50" y="71" url="!ammap_data_usa.xml"></movie>
      <movie file="target" title="Phoenix" lat="33.4486" long="-112.0733" width="10" height="10" fixed_size="true"  value="123" description="requests"></movie>
      <movie file="target" title="Mesa" lat="33.434" long="-111.8483" width="10" height="10" fixed_size="true"  value="10" description="requests"></movie>
      <movie file="target" title="Tempe" lat="33.4148" long="-111.9088" width="10" height="10" fixed_size="true"  value="12" description="requests"></movie>
      <movie file="target" title="Gilbert" lat="33.3504" long="-111.8085" width="10" height="10" fixed_size="true"  value="13" description="requests"></movie>
      <movie file="target" title="Flagstaff" lat="35.4784" long="-111.738" width="10" height="10" fixed_size="true"  value="123" description="requests"></movie>
      <movie file="target" title="Tucson" lat="32.2167" long="-110.9709" width="10" height="10" fixed_size="true"  value="123" description="requests"></movie>
      <movie file="target" title="Sedona" lat="34.6859" long="-111.2845" width="10" height="10" fixed_size="true" value="123" description="requests"></movie>
      <movie file="target" title="Lake Havasu City" lat="34.6022" long="-113.772" width="10" height="10" fixed_size="true"  value="123" description="requests"></movie>
  </movies>     
  <labels>
    <label x="49.8193%" y="5.0392%" text_size="18" color="#FFFFFF" remain="false">
      <text>ARIZONA</text>
    </label>
    <label x="60" y="60" url="!ammap_data_usa.xml" remain="true" color_hover="#CC0000" zoom_x="0%" zoom_y="0" zoom="100%">
        <text><![CDATA[<b>Back to USA map</b>]]></text>
      </label>
  </labels>
</map>

Offline

 

#19 2009-05-13 03:03:25

qemm
Administrator

Re: 2.5.0 lat-long/alignment bug

irfan,

do you have <projection>mercator</projection> set in your settings file?

Offline

 

#20 2009-05-13 09:36:32

trichins
Moderator

Re: 2.5.0 lat-long/alignment bug

irfan,

If you are in deed using the usa_mercator.swf file, your bounding coordinates are off. Try using the followinig and let me know if this works better for you:

<map map_file="maps/usa_mercator.swf" tl_long="-178.244751" tl_lat="71.455555" br_long="-66.936676" br_lat="18.96519"  zoom="1063%" zoom_x="-566.97%" zoom_y="-800.59%">

Offline

 

#21 2009-05-13 09:44:35

trichins
Moderator

Re: 2.5.0 lat-long/alignment bug

cmullican,

I understand your project isn't public. Anyway you could send a sample of the data? If you need to, you can strip out any description data other than coordinates and titles. Also, please send the settings file you are using. Email: tyrichins@hotmail.com We are just having trouble replicating the problem you are experiencing, which makes it difficult to troubleshoot.

Thank you

Offline

 

#22 2009-05-13 13:15:07

cmullican
Member

Re: 2.5.0 lat-long/alignment bug

trichins: Sent!

Offline

 

#23 2009-05-13 20:57:45

trichins
Moderator

Re: 2.5.0 lat-long/alignment bug

cmullcan,

Regarding your second question at the start of this thread: "currently-selected movie -- the one whose details are showing in the text-box -- to be highlighted" (color_selected property). I do not believe this property is valid for movies...only areas, in the current release. Possibly this could be considered for a future release.

I'm still working on the off-set issue.

Offline

 

#24 2009-05-14 11:31:14

cmullican
Member

Re: 2.5.0 lat-long/alignment bug

I have found that, while color_selected is not documented for movies, it does work, if the user  clicks to select.  What I haven't found -- and may not exist yet -- is something like "select_on_hover" -- the text box is populated on hover, but the color change (from color_hover, which I've also set)  doesn't stick unless the user clicks.

To summarize -- "set" and "not set" here refer to data file settings:

case 1: color_hover set, color not set, color_selected either set or not set
result: movie changes color on hover, but does not revert on rollout
problem: all previously selected locations are the hover color, not just the current one

case 2: color_hover set, color set, color_selected not set
result: movie changes color on hover, and reverts on rollout, although text_box still shows data for that datapoint
problem: cannot tell which datapoint matches the current value of the text box

case 3: color_hover set, color set, color_selected set
result: same as case 2, with the addition that the movie color toggles on click, and only one is selected at a time
problem: user must know to click -- surmountable, but an extra step, and inconsistent, since the data displays on hover.  Further, it's easy to accidentally zoom when trying to click on a movie.

Desired: The movie to change to the "selected" or "hover" color when the text_box is displaying its data, and not to revert until the text_box changes -- a combination of 1 and 3, basically.

Offline

 

#25 2009-05-14 11:36:36

trichins
Moderator

Re: 2.5.0 lat-long/alignment bug

Thank you, cmullican. Good to know that, while undocumented, those properties will work for movies, too.

Offline

 

© amMap & amCharts | Forum engine: PunBB