Google Charts POLY problem with VS 2010 image map - visual-studio-2010

Hi I am using http://code.google.com/apis/chart/docs/gallery/googleometer_chart.html
I have:
<img src="http://chart.apis.google.com/chart?cht=bvg&chs=250x150&chd=s:egbdf&chxt=x,y&chxs=0,ff0000,12,0,lt|1,0000ff,10,1,lt&chm=o,000000,0,-1,10|V,000000,0,-1,1:15,,:4:10|H,000000,0,-1,3:9,,:8:17&chxl=0:|E|G|B|D|F" usemap ="#chart" />
<map name='chart'>
<area name='bar0_0' shape='POLY' coords= '124,440,124,499,143,440,143,498' href='#'>
<area name='bar0_1' shape='RECT' coords='55,129,78,63' href='#'>
</map>
When I use 'rect' for shape I can attach a click event etc but when I use 'poly' It doesn't work.
I've use a jQuery mouse position plug in to check the coords and they seem ok.
Can anyone help please?
Thanks

put image into something like paint and get it's coordinates, not the coordinates on the web page Obviosuly, so it will still work anywhere on the page.

Related

Nativescript image area coordinates tap events like HTML Image Map

For a vehicle inspection app, I need to display a flat vector image of a generic vehicle and allow the user to tap areas of that image to select that part of the vehicle and record any damage.
I have a hybrid app that implements this functionality using an HTML image map e.g.
<img src="flat-vehicle-condition-vector.jpg" usemap="#image-map">
<map name="image-map">
<area target="_self" alt="Front Nearside Wheel" title="Front Nearside Wheel" href="Front Nearside Wheel" coords="332,171,34" shape="circle">
<area target="_self" alt="Bonnet" title="Bonnet" href="Bonnet" coords="230,290,231,378,362,398,359,262" shape="poly">
<area target="_self" alt="Front Bumper" title="Front Bumper" href="Front Bumper" coords="88,225,52,441" shape="rect">
</map>
Is there a plugin or an approach to achieve this in NativeScript, please?

Image on Image like Facebook

I would like to put an image on another image like it is done in Facebook, Google+ and now Twitter.
Large back image with a smaller one on the left side dropping off the large one, if that makes sence
There's several ways you can do this, 1 of them is using position (so you're on the right track).
Place 2 images inside an element that has position:relative and place the top image position:absolute, like so:
<div style="position:relative">
<img alt="" src="foreground.jpg" />
<img alt="" style="position:absolute; left:40px; top:20px" src="background.jpg" />
</div>
Check out this DEMO
Another way would be to have the background image set as a background on the <div> and place the image you want on top directly inside that div. Check out this 2nd DEMO

Image Map Plugin for TinyMCE in joomla not working

I have installed the image-map plugin for Tiny MCE in Joomla 2.5.
It appears to be working alright in the backend. I have inserted an image in the article and created image map tags using the plugin button.
The tags for image map appears to be correct
But when I am browsing in the front-end there seems to be no effect for the image map. Firebug shows the line image map area as disabled.
<p>
<img border="0" title="Ground Floor" src="/images/ground-floor.jpg">
<map id="imgmap2012831174531" name="imgmap2012831174531">
<area target="_blank" href="/mywebsolutions.co.in" coords="212,934,294,1058" alt="MYWEB SOLUTIONS" shape="rect">
</map>
The line with
<area target..... appears faded.
</p>
I have tried everything including installing a jquery no conflict plugin.
<object data="images/sampledata/fruitshop/map.png" usemap="#map" border="0">
</object>
<map id="map" name="Map">
Map id should be same to usemap id.
You have to given the src in object tag. Then it will works fine..
All the best....
area tag must be closed properly like,
<area target="_blank" href="/mywebsolutions.co.in" coords="212,934,294,1058" alt="MYWEB SOLUTIONS" shape="rect" />
or
<area target="_blank" href="/mywebsolutions.co.in" coords="212,934,294,1058" alt="MYWEB SOLUTIONS" shape="rect"></area>
One more thing you should not use TineMCE for this function, select CodeMirror or None in site setting, it will definitely work. after saving particular post you can change back to tineMCE. Remember not to edit same on TinyMCE in future, else it will remove your functionality.

Use MapHilight Jquery plug-in to highlight in different colors

I'm trying to figure out how to use MapHilight but not having much luck. The only "documentation" on it seems to just be some working examples. This might be because the site hosting the plugin, seems to be down. I've also just learned JQuery yesterday so I don't know if that's impeding my progress. What I'd like to do is specify the look and feel of my image map hilighting on an area by area basis. David Lynch's Simple Demo shows this, but I'm not sure how it's working. I don't understand why he uses the image has the background for the containing div and what purposes the canvases are serving. Here's what I have so far:
...
<script type="text/javascript">
$(function () {
$('#ImageMap1').maphilight();
});
</script>
</head>
...
<div style="float: left">
<img id="ImageMap1" src="solar_system.jpg" usemap="#ImageMapmapAreas" />
<map id="ImageMapmapAreas" name="ImageMapmapAreas">
<area alt="" title="" href="#Jupiter" coords="222,186,28" shape="circle"/>
<area alt="" title="" href="#Earth" coords="135,194,13" shape="circle"
data-maphilight="{'strokeColor':'0000ff','strokeWidth':5,'fillColor':'ff0000','fillOpacity':0.6}"/>
</map>
</div>
This gives me, I guess, default highlighting of a solid red line. The data-maphilight metadata is not being used. An explanation of how to get this working would be great, but directing me to a resource explaining how to use maphilight overall would be even better because I ultimately want to make use of almost everything in this demo.
I see that you decided to switch to Silverlight but since I'm fiddling with maphighlight now I decided to look at this.
The thing is that the sample you posted works fine after switching " with ' and vice versa.
<div style="float: left">
<img id="ImageMap1" src="http://geographyandhistory.wikispaces.com/file/view/solar_system.jpg/43347125/283x202/solar_system.jpg" usemap="#ImageMapmapAreas" />
<map id="ImageMapmapAreas" name="ImageMapmapAreas">
<area alt="" title="" href="#Earth" coords="228,151,53" shape="circle" data-maphilight='{"strokeColor":"0000ff","strokeWidth":5,"fillColor":"00ff00","fillOpacity":0.6}'/>
<area alt="" title="" href="#Sun" coords="68,54,44" shape="circle" data-maphilight="{'strokeColor':'0000ff','strokeWidth':5,'fillColor':'00ff00','fillOpacity':0.6}"/>
</map>
</div>​
Here's a fiddle - http://jsfiddle.net/k67gq/6/
See how the 'Earth' and 'Sun' areas have the same 'data-maphilight' attributes except quotation marks.
Instead of " or ', using " in data-maphilight worked for me.
Ex: data-maphilight="{"strokeColor":"0000ff",...
I guess there's nothing available. Strange when I saw so many references to this plugin when searching for how to do custom hilighting. I ended up having to use Silverlight.

How do I get a usemap working within a firefox XUL document

In my XUL I have the following code fragments:
<map name="KeypadMap">
<area href="javascript:pad('A')" coords="1,1,31,31" shape="rect"/>
</map>
...
<hbox flex="1">
<image src="./keypad.png" width="32" height="32" useMap="#KeypadMap"/>
</hbox>
The image displays just fine, however, when I mouse over, the cursor does not change to a hand, and clicking does not call the pad function.
Similar code works fine in straight HTML, so there must be some trick to get it working via a Firefox XUL file.
You'll have to use a namespace to embed HTML inside of XUL. Check this guide.

Resources