Google Groups Home
Help | Sign in
Different markers for different maps
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  15 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
onda  
View profile
 More options Jul 3, 5:58 am
From: onda <profumodimi...@gmail.com>
Date: Thu, 3 Jul 2008 02:58:00 -0700 (PDT)
Subject: Different markers for different maps
Salve!

I would like to have a map that takes the coordinates from a file xml,
but when I change the map type, it takes the coordinates from another
file xml

I want that to correct the error between map and satellite map
coordinates.

Can you tell me if this is possible?  And how can I do it?


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
igloo  
View profile
 More options Jul 3, 7:12 am
From: igloo <iglo...@gmail.com>
Date: Thu, 3 Jul 2008 04:12:11 -0700 (PDT)
Local: Thurs, Jul 3 2008 7:12 am
Subject: Re: Different markers for different maps
There is a maptypechanged event on the GMap2 class that you can use to
remove one set of markers and overlay another set.

Rather than read the xml file every time you switch, it would probably
be better to read both files into two different arrays when
initialising the map.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
onda  
View profile
(1 user)  More options Jul 3, 10:49 am
From: onda <profumodimi...@gmail.com>
Date: Thu, 3 Jul 2008 07:49:17 -0700 (PDT)
Local: Thurs, Jul 3 2008 10:49 am
Subject: Re: Different markers for different maps
Is it possible to look an example?

On 3 Lug, 13:12, igloo <iglo...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mkross  
View profile
 More options Jul 3, 10:59 am
From: mkross <mkr...@andrew.cmu.edu>
Date: Thu, 3 Jul 2008 07:59:32 -0700 (PDT)
Local: Thurs, Jul 3 2008 10:59 am
Subject: Re: Different markers for different maps
I don't have a map example, but I'll elaborate on it for you.  He's
basically saying (I think) that you should cache the markers instead
of reading from a file every time.  This makes sense, as it cuts down
on the file-access wait time.  (The only time to consider not doing
this is if your data sets are outrageously large to the point of
sucking too much memory from a client's computer.  However, if your
sets are that large, it seems to me that you shouldn't be displaying
them dynamically from a kml file.)

Don't do this:
- Map Loads
- XMLDoc1 is read and points are added
- user clicks on the "change to other doc"
- XMLDoc1 is unloaded.
- XMLDoc2 is read and points are added
- user clicks on the "change to other doc"
- XMLDoc2 is unloaded.
- XMLDoc1 is read and points are added

You end up wasting a lot of time reading the files multiple times.
Instead, you want to cache the contents of the files in an array or
something.  File access is slow, memory access is fast.  Hence, you
want to do something more like this:
-Map Loads
-XMLDoc1 is read and data is put into array Doc1Data
-XMLDoc2 is read and data is put into array Doc2Data
-Points are displayed on the map from Doc1Data
-User switches modes. (No need to read file)
-Doc1Data is cleared from the map, but stays in memory
-Doc2Data is added to the map.
-User switches back to the first set.(No need to read file)
-Doc2Data is cleared from the map, but stays in memory
-Doc1Data is added to the map.

On Jul 3, 10:49 am, onda <profumodimi...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
geocodezip@gmail.com  
View profile
 More options Jul 3, 11:27 am
From: "geocode...@gmail.com" <geocode...@gmail.com>
Date: Thu, 3 Jul 2008 08:27:23 -0700 (PDT)
Local: Thurs, Jul 3 2008 11:27 am
Subject: Re: Different markers for different maps
On Jul 3, 2:58 am, onda <profumodimi...@gmail.com> wrote:

> Salve!

> I would like to have a map that takes the coordinates from a file xml,
> but when I change the map type, it takes the coordinates from another
> file xml

> I want that to correct the error between map and satellite map
> coordinates.

If it is a fixed offset in your area of interest you could just move
the markers by that offset when the map type changes.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
onda  
View profile
 More options Jul 4, 4:23 am
From: onda <profumodimi...@gmail.com>
Date: Fri, 4 Jul 2008 01:23:10 -0700 (PDT)
Local: Fri, Jul 4 2008 4:23 am
Subject: Re: Different markers for different maps
Tanks Mkross, but I don't understood anything. I don't speak English
and I can't translate your suggestions. I only understand Geocodezip,
but itsn't a fixed offset.

So you can tell me if it's possible to connect two different maps,
like http://econym.googlepages.com/example_dualmap.htm. But not the
same. In this map the markers in the main map have the same
coordinates of the xhair in the minmap. And the error remain.

I would like to connect two maps,  totally independent the one from
the other. So I can put the correct markers for every type of map.

I don't know if you understand me.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ralph Ames  
View profile
 More options Jul 4, 10:20 am
From: Ralph Ames <ralph.a...@gmail.com>
Date: Fri, 4 Jul 2008 17:20:58 +0300
Local: Fri, Jul 4 2008 10:20 am
Subject: RE: Different markers for different maps

>I don't know if you understand me.

I'm not sure, but here is a link anyway:

http://www.easypagez.com/maps/twomaps.html

Ralph


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
onda  
View profile
 More options Jul 4, 11:27 am
From: onda <profumodimi...@gmail.com>
Date: Fri, 4 Jul 2008 08:27:37 -0700 (PDT)
Local: Fri, Jul 4 2008 11:27 am
Subject: Re: Different markers for different maps
Thanks Ralph. But the maps are not connected among them and they are
not independent. So I would not know how to correct the error.

On 4 Lug, 16:20, Ralph Ames <ralph.a...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ralph Ames  
View profile
 More options Jul 4, 11:37 am
From: Ralph Ames <ralph.a...@gmail.com>
Date: Fri, 4 Jul 2008 18:37:16 +0300
Local: Fri, Jul 4 2008 11:37 am
Subject: RE: Different markers for different maps

>Thanks Ralph. But the maps are not connected among them and they are
>not independent. So I would not know how to correct the error.

Try to explain in more detail what you are trying to do?

Do you want two separate maps with different markers?

How do you want them connected and not independant.

Ralph

www.easypagez.com/map_index.html
-


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
onda  
View profile
 More options Jul 5, 4:25 am
From: onda <profumodimi...@gmail.com>
Date: Sat, 5 Jul 2008 01:25:08 -0700 (PDT)
Local: Sat, Jul 5 2008 4:25 am
Subject: Re: Different markers for different maps
Ok Ralph.

When you passe from the sat-map to the map, a marker with some
determine coordinates, it is positioned in a different point.

So I would like at least one of these two solutions:

1) Or when I change the map type, the map takes the data of the
coordinates of the markers from another file xml. This way I can have
a file xml for the map and another for the sat-map. So I can eliminate
the error.

2) Or I would like to succeed in connecting two independent maps (what
they are found in two different web pages) as this
http://econym.googlepages.com/example_dualmap.htm, that however not
being independent, the marker of the map marks a place and the
corresponding marker (xhair) of the minimap it marks another place.
I would like that when click in the sidebar, I can see in the map the
marker of a map and in the minimap the marker of the other map. So I
can eliminate the error.

I hope you understand me. It's very difficult for me to explain me in
English.

On 4 Lug, 17:37, Ralph Ames <ralph.a...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rossko  
View profile
 More options Jul 5, 5:58 am
From: Rossko <ros...@culzean.clara.co.uk>
Date: Sat, 5 Jul 2008 02:58:01 -0700 (PDT)
Local: Sat, Jul 5 2008 5:58 am
Subject: Re: Different markers for different maps
Earlier in the thread, they told you about a feature you could use to
detect when the user changes the map -
    "There is a maptypechanged event on the GMap2 class ..."

This thread gives help on how to use more than one XML file -
    http://groups.google.com/group/Google-Maps-API/browse_thread/thread/f...

You just need to combine the two :)

Igloo also advised, that instead of fetching a new XML every time the
map type switches, you could fetch and store BOTH XML files in the
beginning.   That would make switching from one set of markers to the
other work better.

good luck, Ross K


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ralph Ames  
View profile
 More options Jul 5, 9:41 pm
From: Ralph Ames <ralph.a...@gmail.com>
Date: Sun, 6 Jul 2008 04:41:31 +0300
Local: Sat, Jul 5 2008 9:41 pm
Subject: RE: Different markers for different maps
Where is the link to your map?

Ralph

www.easypagez.com/maps/map_index.html
-


    Reply    Reply to author    Forward