Jump to content
  • 0

Using different map pointers depending on data - possible?



Hi all --

I'm working on a data page that maps police calls, which fall under about 8 categories (burglary, vehicle theft, assault, etc.) In the data table, I added a column that has a number corresponding to one of the map pointer styles in the mashup code (i.e. assault is 1, burglary 2, etc.) In my mashup code, rather than choosing a specific number, I use the variable for the field in the table. Here's the code:


<div id="mapType" style="display:none">Y</div>

<div id="mapWidth" style="display:none">660</div>

<div id="mapHeight" style="display:none">750</div>

===>  <div id="mapIcon" style="display:none">[@field:police_call_marker]</div>

<div id="plotMulti" style="display:none">Y</div>

<div id="zoomLevel" style="display:none">5</div>

<tt style="display:none">[@field:police_call_address], Syracuse, N.Y.</tt>

<div id="iconDesc[@field:police_call_ID]" style="display:none">
[font=" verdana; font-size: 8pt; line-height: 10pt;"]<strong>[@field:police_call_crime]</strong>



<div id="home_position" style="display:none">Croton Terrace, Syracuse, N.Y.</div>

This works fine if I search on and display a single crime category -- assaults come up with one color pointer, burglaries a different color pointer, and so forth. But if I display all crimes at the same time, all the pointers are the same color. In other words, it doesn't loop the way the information bubble does based on the ID and color each pointer depending on the number in that field.

Is there a way around this, perhaps through JavaScript?


-- Mike

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...